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:DGF"
(new) |
(order of parameters) |
||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
==Purpose== | ==Purpose== | ||
− | Displays a short form of a [[Generalized Fermat number]] of the form a<sup>2<sup> | + | Displays a short form of a [[Generalized Fermat number]] of the form {{V|a}}<sup>2<sup>{{Vn}}</sup></sup> + {{V|b}}<sup>2<sup>{{Vn}}</sup></sup> (if {{Vb}}=1 : {{V|a}}<sup>2<sup>{{Vn}}</sup></sup> + 1) with link to the page. |
==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>{{DGF|<value>|<value>|<value>}}</nowiki></code> | :<code><nowiki>{{DGF|<value>|<value>|<value>}}</nowiki></code> | ||
− | *one parameter: the | + | *one parameter: the {{Vn}}-value is given and displays as [[Fermat number]] {{Kbn|+|2<sup>n</sup>}}: F(n) |
− | *two parameters: the | + | *two parameters: the {{Vn}}- and {{V|a}}-values are given and display as [[Generalized Fermat number]] {{Kbn|+|1|a|2<sup>n</sup>}}: GF(n,a) |
− | *three parameters: the | + | *three parameters: the {{Vn}}-, {{V|a}}- and {{Vb}}-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>: xGF(n,a,b) |
==Examples== | ==Examples== | ||
*<code><nowiki>{{DGF|123}}</nowiki></code>: {{DGF|123}} | *<code><nowiki>{{DGF|123}}</nowiki></code>: {{DGF|123}} | ||
− | *<code><nowiki>{{DGF|3 | + | *<code><nowiki>{{DGF|123|3}}</nowiki></code>: {{DGF|123|3}} |
− | *<code><nowiki>{{DGF|5|3 | + | *<code><nowiki>{{DGF|123|5|3}}</nowiki></code>: {{DGF|123|5|3}} |
[[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}}}|F({{{1}}})]] | |1=[[Generalized Fermat number 2 1 {{{1}}}|F({{{1}}})]] | ||
− | |2=[[Generalized Fermat number {{{ | + | |2=[[Generalized Fermat number {{{2}}} 1 {{{1}}}|GF({{{2}}},{{{1}}})]] |
− | |3=[[Generalized Fermat number {{{ | + | |3=[[Generalized Fermat number {{{2}}} {{{3}}} {{{1}}}|xGF({{{1}}},{{{2}}},{{{3}}})]]}}</includeonly> |
Revision as of 08:36, 27 October 2020
Purpose
Displays a short form of 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:
{{DGF|<value>|<value>|<value>}}
- one parameter: the n-value is given and displays as Fermat number 22n+1: F(n)
- two parameters: the n- and a-values are given and display as Generalized Fermat number a2n+1: GF(n,a)
- three parameters: the n-, a- and b-values given and display as Extended Generalized Fermat number a2n + b2n: xGF(n,a,b)
Examples
{{DGF|123}}
: F(123){{DGF|123|3}}
: GF(123,3){{DGF|123|5|3}}
: xGF(123,5,3)