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"
(new) |
m |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
==Purpose== | ==Purpose== | ||
− | Displays ( | + | Displays (General/Near) Woodall numbers with link to the page. |
==Usage== | ==Usage== | ||
This templates uses one to three unnamed parameters which are defined as follows: | This templates uses one to three unnamed parameters which are defined as follows: | ||
− | *one parameter: the | + | *one parameter: the {{Vn}}-value is given and displays a [[Woodall prime 2|Woodall prime]] {{Kbn|n|2|n}} |
*two parameters: | *two parameters: | ||
− | **if first parameter is a sign (+/-): displays a [[ | + | **if first parameter is a sign (+/-): displays a [[:Category:Woodall prime P|Woodall prime P]] {{Kbn|(n+1)|2|n}} or [[:Category:Woodall prime M|Woodall prime M]] {{Kbn|(n-1)|2|n}} |
− | **if first parameter is a number: displays a [[ | + | **if first parameter is a number: displays a [[Woodall prime]] {{Kbn|n|b|n}} |
− | *three parameters: displays a [[ | + | *three parameters: displays a [[:Category:Woodall prime P|Woodall prime P]] {{Kbn|(n+1)|b|n}} or [[:Category:Woodall prime M|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| | + | *<code><nowiki>{{NWo|3|123}}</nowiki></code>: {{NWo|3|123}} |
− | *<code><nowiki>{{NWo|+| | + | *<code><nowiki>{{NWo|+|3|123}}</nowiki></code>: {{NWo|+|3|123}} |
− | *<code><nowiki>{{NWo|-| | + | *<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=[[ | + | |1=[[Woodall prime 2|Woodall {{Kbn|{{{1}}}|{{{1}}}}}]] |
− | |2={{#ifeq:{{{1}}}|+|[[ | + | |2={{#ifeq:{{{1}}}|+|[[Woodall prime P 2|Near Woodall {{Kbn|{{#expr:{{{2}}}+1}}|{{{2}}}}}]]|{{#ifeq:{{{1}}}|-|[[Woodall prime M 2|Near Woodall {{Kbn|{{#expr:{{{2}}}-1}}|{{{2}}}}}]]|[[Woodall prime {{{1}}}|Woodall {{Kbn|{{{2}}}|{{{1}}}|{{{2}}}}}]]}}}} |
− | |3={{#ifeq:{{{1}}}|+|[[ | + | |3={{#ifeq:{{{1}}}|+|[[Woodall prime P {{{2}}}|Near Woodall {{Kbn|{{#expr:{{{3}}}+1}}|{{{2}}}|{{{3}}}}}]]|[[Woodall prime M {{{2}}}|Near Woodall {{Kbn|{{#expr:{{{3}}}-1}}|{{{2}}}|{{{3}}}}}]]}}}}</includeonly> |
Latest revision as of 19:24, 17 September 2021
Purpose
Displays (General/Near) Woodall numbers with link to the page.
Usage
This templates uses one to three unnamed parameters which are defined as follows:
- one parameter: the n-value is given and displays a Woodall prime n•2n-1
- two parameters:
- if first parameter is a sign (+/-): displays a Woodall prime P (n+1)•2n-1 or Woodall prime M (n-1)•2n-1
- if first parameter is a number: displays a Woodall prime n•bn-1
- three parameters: displays a Woodall prime P (n+1)•bn-1 or Woodall prime M (n-1)•bn-1
Examples
{{NWo|123}}
: Woodall 123•2123-1{{NWo|+|123}}
: Near Woodall 124•2123-1{{NWo|-|123}}
: Near Woodall 122•2123-1{{NWo|3|123}}
: Woodall 123•3123-1{{NWo|+|3|123}}
: Near Woodall 124•3123-1{{NWo|-|3|123}}
: Near Woodall 122•3123-1