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 |
(link&real examp.&2nd param=2) |
||
Line 8: | Line 8: | ||
*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>}} | ||
− | *three parameters: the ''a''-, ''b''- and ''n''-values given and display as [[Extended Generalized Fermat number]] a<sup>2<sup>n</sup></sup> + b<sup>2<sup>n</sup></sup> | + | *three parameters: the ''a''-, ''b''- and ''n''-values given and display as [[Generalized Fermat number|Extended Generalized Fermat number]] a<sup>2<sup>n</sup></sup> + b<sup>2<sup>n</sup></sup> |
==Examples== | ==Examples== | ||
− | *<code><nowiki>{{NGF| | + | *<code><nowiki>{{NGF|55}}</nowiki></code>: {{NGF|55}} |
− | *<code><nowiki>{{NGF|3| | + | *<code><nowiki>{{NGF|2|55}}</nowiki></code>: {{NGF|2|55}} |
− | *<code><nowiki>{{NGF| | + | *<code><nowiki>{{NGF|3|15}}</nowiki></code>: {{NGF|3|15}} |
+ | *<code><nowiki>{{NGF|7|6|14}}</nowiki></code>: {{NGF|7|6|14}} | ||
[[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=[[Generalized Fermat number 2 1 {{{1}}}|Fermat {{Kbn|+|2<sup>{{{1}}}</sup>}}]] | |1=[[Generalized Fermat number 2 1 {{{1}}}|Fermat {{Kbn|+|2<sup>{{{1}}}</sup>}}]] | ||
− | |2=[[Generalized Fermat number {{{1}}} 1 {{{2}}}|Gen. Fermat {{Kbn|+|1|{{{1}}}|2<sup>{{{2}}}</sup>}}]] | + | |2={{#ifeq:{{{1}}}|2|[[Generalized Fermat number 2 1 {{{2}}}|Fermat {{Kbn|+|2<sup>{{{2}}}</sup>}}]]|[[Generalized Fermat number {{{1}}} 1 {{{2}}}|Gen. Fermat {{Kbn|+|1|{{{1}}}|2<sup>{{{2}}}</sup>}}]]}} |
|3=[[Generalized Fermat number {{{1}}} {{{2}}} {{{3}}}|xGen. Fermat {{{1}}}<sup>2<sup>{{{3}}}</sup></sup>+{{{2}}}<sup>2<sup>{{{3}}}</sup></sup>]]}}</includeonly> | |3=[[Generalized Fermat number {{{1}}} {{{2}}} {{{3}}}|xGen. Fermat {{{1}}}<sup>2<sup>{{{3}}}</sup></sup>+{{{2}}}<sup>2<sup>{{{3}}}</sup></sup>]]}}</includeonly> |
Latest revision as of 09:26, 7 June 2024
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|55}}
: Fermat 2255+1{{NGF|2|55}}
: Fermat 2255+1{{NGF|3|15}}
: Gen. Fermat 3215+1{{NGF|7|6|14}}
: xGen. Fermat 7214+6214