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:NPr"
m |
(for 2 params k-val=1 not printed) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
This template uses one to three unnamed parameters which are defined as follows: | This template uses one to three unnamed parameters which are defined as follows: | ||
:<code><nowiki>{{NPr|<k-value>|<base>|<n-value>}}</nowiki></code> | :<code><nowiki>{{NPr|<k-value>|<base>|<n-value>}}</nowiki></code> | ||
− | *one parameter: the | + | *one parameter: the {{Vn}}-value is given and displays as [[Proth number]] {{Kbn|+|1|2|n}} |
− | *two parameters: the | + | *two parameters: the {{Vk}}- and {{Vn}}-values are given and displays as [[Proth number]] {{Kbn|+|k|2|n}} |
− | *three parameters: the | + | *three parameters: the {{Vk}}- and {{Vn}}-values and the base {{Vb}} given and displays as [[Proth number]] {{Kbn|+|k|b|n}} |
==Examples== | ==Examples== | ||
*<code><nowiki>{{NPr|123}}</nowiki></code>: {{NPr|123}} | *<code><nowiki>{{NPr|123}}</nowiki></code>: {{NPr|123}} | ||
+ | *<code><nowiki>{{NPr|1|8}}</nowiki></code>: {{NPr|1|8}} | ||
*<code><nowiki>{{NPr|3|123}}</nowiki></code>: {{NPr|3|123}} | *<code><nowiki>{{NPr|3|123}}</nowiki></code>: {{NPr|3|123}} | ||
− | *<code><nowiki>{{NPr| | + | *<code><nowiki>{{NPr|48|7|126}}</nowiki></code>: {{NPr|48|7|126}} |
[[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=[[Proth prime 1| | + | |1=[[Proth prime 2 1|Proth {{Kbn|+|{{{1}}}}}]] |
− | |2=[[Proth prime {{{1}}}|Proth {{Kbn|+|{{{1}}}|{{{2}}}}}]] | + | |2=[[Proth prime 2 {{{1}}}|Proth {{#ifeq:{{{1}}}|1|{{Kbn|+|{{{2}}}}}|{{Kbn|+|{{{1}}}|{{{2}}}}}}}]] |
− | |3=[[ | + | |3=[[Proth prime {{{2}}} {{{1}}}|Proth {{Kbn|+|{{{1}}}|{{{2}}}|{{{3}}}}}]]}}</includeonly> |
Latest revision as of 19:03, 6 June 2024
Purpose
Displays a Proth number of the form k•bn+1 with link to the page.
Usage
This template uses one to three unnamed parameters which are defined as follows:
{{NPr|<k-value>|<base>|<n-value>}}
- one parameter: the n-value is given and displays as Proth number 2n+1
- two parameters: the k- and n-values are given and displays as Proth number k•2n+1
- three parameters: the k- and n-values and the base b given and displays as Proth number k•bn+1
Examples
{{NPr|123}}
: Proth 2123+1{{NPr|1|8}}
: Proth 28+1{{NPr|3|123}}
: Proth 3•2123+1{{NPr|48|7|126}}
: Proth 48•7126+1