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:NGF"
m (Karbon moved page Template:NFt to Template:NGF without leaving a redirect: name) |
m |
||
Line 5: | Line 5: | ||
==Usage== | ==Usage== | ||
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>{{ | + | :<code><nowiki>{{NGF|<value>|<value>|<value>}}</nowiki></code> |
*one parameter: the ''n''-value is given and displays as [[Fermat number]] {{Kbn|+|2<sup>n</sup>}} | *one parameter: the ''n''-value is given and displays as [[Fermat number]] {{Kbn|+|2<sup>n</sup>}} | ||
*two parameters: the ''a''- and ''n''-values are given and display as [[Generalized Fermat number]] {{Kbn|+|1|a|2<sup>n</sup>}} | *two parameters: the ''a''- and ''n''-values are given and display as [[Generalized Fermat number]] {{Kbn|+|1|a|2<sup>n</sup>}} | ||
Line 11: | Line 11: | ||
==Examples== | ==Examples== | ||
− | *<code><nowiki>{{ | + | *<code><nowiki>{{NGF|123}}</nowiki></code>: {{NGF|123}} |
− | *<code><nowiki>{{ | + | *<code><nowiki>{{NGF|3|123}}</nowiki></code>: {{NGF|3|123}} |
− | *<code><nowiki>{{ | + | *<code><nowiki>{{NGF|5|3|123}}</nowiki></code>: {{NGF|5|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}} |
Revision as of 10:27, 1 July 2020
Purpose
Displays a Generalized Fermat number of the form a2n + b2n (if b=1 : a2n + 1) with link to the page.
Usage
This template uses one to three unnamed parameters which are defined as follows:
{{NGF|<value>|<value>|<value>}}
- one parameter: the n-value is given and displays as Fermat number 22n+1
- two parameters: the a- and n-values are given and display as Generalized Fermat number a2n+1
- three parameters: the a-, b- and n-values given and display as Extended Generalized Fermat number a2n + b2n
Examples
{{NGF|123}}
: Fermat 22123+1{{NGF|3|123}}
: Gen. Fermat 32123+1{{NGF|5|3|123}}
: xGen. Fermat 52123+32123