Currently there may be errors shown on top of a page, because of a missing Wiki update (PHP version and extension DPL3).
Navigation
Topics Help • Register • News • History • How to • Sequences statistics • Template prototypes

Difference between revisions of "Template:NWo"

From Prime-Wiki
Jump to: navigation, search
m
m
Line 7: Line 7:
 
*one parameter: the n-value is given and displays a [[Gen. Woodall prime 2|Woodall prime]] {{Kbn|n|2|n}}
 
*one parameter: the n-value is given and displays a [[Gen. Woodall prime 2|Woodall prime]] {{Kbn|n|2|n}}
 
*two parameters:
 
*two parameters:
**if first parameter is a sign (+/-): displays a [[Near Gen. Woodall prime 2|Near Woodall prime]] {{Kbn|(n±1)|2|n}}
+
**if first parameter is a sign (+/-): displays a [[:category:Gen. Woodall prime P|Gen. Woodall prime P]] {{Kbn|(n+1)|2|n}} or [[:category:Gen. Woodall prime M|Gen. Woodall prime M]] {{Kbn|(n-1)|2|n}}
 
**if first parameter is a number: displays a [[Gen. Woodall prime]] {{Kbn|n|b|n}}
 
**if first parameter is a number: displays a [[Gen. Woodall prime]] {{Kbn|n|b|n}}
*three parameters: displays a [[Near Gen. Woodall prime]] {{Kbn|(n±1)|b|n}}
+
*three parameters: displays a [[:category:Gen. Woodall prime P|Gen. Woodall prime P]] {{Kbn|(n+1)|b|n}} or [[:category:Gen. Woodall prime M|Gen. Woodall prime M]] {{Kbn|(n-1)|b|n}}
  
 
==Examples==
 
==Examples==
Line 15: Line 15:
 
*<code><nowiki>{{NWo|+|123}}</nowiki></code>: {{NWo|+|123}}
 
*<code><nowiki>{{NWo|+|123}}</nowiki></code>: {{NWo|+|123}}
 
*<code><nowiki>{{NWo|-|123}}</nowiki></code>: {{NWo|-|123}}
 
*<code><nowiki>{{NWo|-|123}}</nowiki></code>: {{NWo|-|123}}
*<code><nowiki>{{NWo|12|123}}</nowiki></code>: {{NWo|12|123}}
+
*<code><nowiki>{{NWo|3|123}}</nowiki></code>: {{NWo|3|123}}
*<code><nowiki>{{NWo|+|12|123}}</nowiki></code>: {{NWo|+|12|123}}
+
*<code><nowiki>{{NWo|+|3|123}}</nowiki></code>: {{NWo|+|3|123}}
*<code><nowiki>{{NWo|-|12|123}}</nowiki></code>: {{NWo|-|12|123}}
+
*<code><nowiki>{{NWo|-|3|123}}</nowiki></code>: {{NWo|-|3|123}}
  
 
[[Category:Templates]]</noinclude><includeonly>{{#vardefine:args|0}}{{#if:{{{3|}}}|{{#vardefine:args|3}}|{{#if:{{{2|}}}|{{#vardefine:args|2}}|{{#vardefine:args|1}}}}}}{{#switch:{{#var:args}}
 
[[Category:Templates]]</noinclude><includeonly>{{#vardefine:args|0}}{{#if:{{{3|}}}|{{#vardefine:args|3}}|{{#if:{{{2|}}}|{{#vardefine:args|2}}|{{#vardefine:args|1}}}}}}{{#switch:{{#var:args}}
 
|1=[[Gen. Woodall prime 2|Woodall {{Kbn|{{{1}}}|{{{1}}}}}]]
 
|1=[[Gen. Woodall prime 2|Woodall {{Kbn|{{{1}}}|{{{1}}}}}]]
|2={{#ifeq:{{{1}}}|+|[[Near Gen. Woodall prime 2|Near Woodall {{Kbn|{{#expr:{{{2}}}+1}}|{{{2}}}}}]]|{{#ifeq:{{{1}}}|-|[[Near Gen. Woodall prime 2|Near Woodall {{Kbn|{{#expr:{{{2}}}-1}}|{{{2}}}}}]]|[[Gen. Woodall prime {{{1}}}|Gen. Woodall {{Kbn|{{{2}}}|{{{1}}}|{{{2}}}}}]]}}}}
+
|2={{#ifeq:{{{1}}}|+|[[Gen. Woodall prime P 2|Near Woodall {{Kbn|{{#expr:{{{2}}}+1}}|{{{2}}}}}]]|{{#ifeq:{{{1}}}|-|[[Gen. Woodall prime M 2|Near Woodall {{Kbn|{{#expr:{{{2}}}-1}}|{{{2}}}}}]]|[[Gen. Woodall prime {{{1}}}|Gen. Woodall {{Kbn|{{{2}}}|{{{1}}}|{{{2}}}}}]]}}}}
|3={{#ifeq:{{{1}}}|+|[[Near Gen. Woodall prime {{{2}}}|Near Gen. Woodall {{Kbn|{{#expr:{{{3}}}+1}}|{{{2}}}|{{{3}}}}}]]|[[Near Gen. Woodall prime {{{2}}}|Near Gen. Woodall {{Kbn|{{#expr:{{{3}}}-1}}|{{{2}}}|{{{3}}}}}]]}}}}</includeonly>
+
|3={{#ifeq:{{{1}}}|+|[[Gen. Woodall prime P {{{2}}}|Near Gen. Woodall {{Kbn|{{#expr:{{{3}}}+1}}|{{{2}}}|{{{3}}}}}]]|[[Gen. Woodall prime M {{{2}}}|Near Gen. Woodall {{Kbn|{{#expr:{{{3}}}-1}}|{{{2}}}|{{{3}}}}}]]}}}}</includeonly>

Revision as of 12:56, 19 August 2019

Purpose

Displays (Gen./Near) Woodall numbers with link to the page.

Usage

This templates uses one to three unnamed parameters which are defined as follows:

Examples