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:Generalized Fermat number"
(factorization) |
m |
||
(24 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
Template Generalized Fermat number | Template Generalized Fermat number | ||
− | Collect the data of a [[Generalized Fermat number]] | + | Collect the data of a [[Generalized Fermat number]] {{V|a}}<sup>2<sup>{{Vn}}</sup></sup> + {{V|b}}<sup>2<sup>{{Vn}}</sup></sup>, for {{Vb}}=1 this is a [[Fermat number]] {{V|a}}<sup>2<sup>{{Vn}}</sup></sup> + 1. |
==Prototype== | ==Prototype== | ||
Line 20: | Line 20: | ||
==Parameters== | ==Parameters== | ||
+ | If 'GFNa'+'GFNb' is even, the numbers are always divisible by 2 and so 2 is not given as factor here. | ||
+ | |||
+ | If 'GFNFDBid' is given, a link to the [[Factoring Database|FactorDB]] is created, otherwise only the number in standard notation is given. | ||
+ | |||
+ | For the case ({{V|a}},{{V|b}}) = (8,1) the number for {{V|F}}<sub>{{Vn}}</sub>(8,1) div 2<sup>2<sup>{{Vn}}</sup></sup>+1 = 4<sup>2<sup>n</sup></sup> − 2<sup>2<sup>n</sup></sup> + 1 is given. | ||
==See also== | ==See also== | ||
+ | *[[Template:GF Divisor|GF Divisor]] | ||
==Example== | ==Example== | ||
Line 32: | Line 38: | ||
|GFNDigits=1234 | |GFNDigits=1234 | ||
|GFNFactors= | |GFNFactors= | ||
− | 3, | + | 3,5 |
+ | 3,209 | ||
7,14 | 7,14 | ||
− | + | 15288227662166113,8 | |
+ | N1100000002618011261,9 | ||
P345 | P345 | ||
C1133,1100000000212123761 | C1133,1100000000212123761 | ||
− | |GFNState= | + | U12345,4545 |
+ | |GFNState=CF | ||
|GFNRemarks=test | |GFNRemarks=test | ||
}} | }} | ||
Line 49: | Line 58: | ||
|GFNDigits=1234 | |GFNDigits=1234 | ||
|GFNFactors= | |GFNFactors= | ||
− | 3, | + | 3,5 |
+ | 3,209 | ||
7,14 | 7,14 | ||
− | + | 15288227662166113,8 | |
+ | N1100000002618011261,9 | ||
P345 | P345 | ||
C1133,1100000000212123761 | C1133,1100000000212123761 | ||
− | |GFNState= | + | U12345,4545 |
+ | |GFNState=CF | ||
|GFNRemarks=test | |GFNRemarks=test | ||
}} | }} | ||
− | [[Category:Prime collections]]</noinclude><includeonly>__NOTOC__{{#ifeq:{{NAMESPACENUMBER}}|0| | + | [[Category:Prime collections]]</noinclude><includeonly>__NOTOC__{{#ifeq:{{NAMESPACENUMBER}}|0|{{#vardefine:Ta|{{#explode:{{PAGENAME}}||-3}}}}{{#vardefine:Tb|{{#explode:{{PAGENAME}}||-2}}}}{{#vardefine:Tn|{{#explode:{{PAGENAME}}||-1}}}}{{#ifeq:{{#var:Tb}}|1|{{#ifeq:{{#var:Ta}}|2|{{DISPLAYTITLE:Fermat number 2<sup>2<sup>{{#var:Tn}}</sup></sup>+1}}|{{#ifeq:{{#var:Ta}}|8|{{DISPLAYTITLE:Generalized Fermat number {{#var:Ta}}<sup>2<sup>{{#var:Tn}}</sup></sup>+1 div (2<sup>2<sup>{{#var:Tn}}</sup></sup>+1)}}|{{DISPLAYTITLE:Generalized Fermat number {{#var:Ta}}<sup>2<sup>{{#var:Tn}}</sup></sup>+1{{#ifexpr:({{#var:Ta}}+{{#var:Tb}}) mod 2|| div 2}}}}}}}}|{{DISPLAYTITLE:Generalized Fermat number {{#var:Ta}}<sup>2<sup>{{#var:Tn}}</sup></sup>+{{#var:Tb}}<sup>2<sup>{{#var:Tn}}</sup></sup>{{#ifexpr:({{#var:Ta}}+{{#var:Tb}}) mod 2|| div 2}}}}}}}} |
− | |||
− | |||
− | |||
− | }} | ||
==Current data== | ==Current data== | ||
{| class="primedata" | {| class="primedata" | ||
| class="primetemplate color-PrimeTemplate" | | | class="primetemplate color-PrimeTemplate" | | ||
{| | {| | ||
− | | align="right"| <b>{{V|a}} :</b> || {{{GFNa}}} | + | | align="right"| <b>{{V|a}} {{Vb}} {{Vn}} :</b> || {{{GFNa}}} {{{GFNb}}} {{{GFNn}}} |
+ | <!-- |- | ||
+ | | align="right"| <b>{{Vb}} :</b> || {{{GFNb}}} | ||
|- | |- | ||
− | | align="right"| <b>{{ | + | | align="right"| <b>{{Vn}} :</b> || {{{GFNn}}}--> |
|- | |- | ||
− | + | {{#if:{{{GFNFDBid|}}}| | |
− | + | {{!}} align="right"{{!}} [[Factoring Database|FactorDB]] : {{!}}{{!}} <b>ID:</b> [http://factordb.com/index.php?id={{{GFNFDBid}}} {{{GFNFDBid}}}] / <b>Formula:</b> {{#ifeq:{{{GFNb}}}|1|{{#ifeq:{{{GFNa}}}|2|[http://factordb.com/index.php?query=2^2^{{{GFNn}}}%2B1 2<sup>2<sup>{{{GFNn}}}</sup></sup>+1]|{{#ifeq:{{{GFNa}}}|8|[http://factordb.com/index.php?query=({{{GFNa}}}^2^{{{GFNn}}}%2B1)/(2^2^{{{GFNn}}}%2B1) {{{GFNa}}}<sup>2<sup>{{{GFNn}}}</sup></sup>+1 div (2<sup>2<sup>{{{GFNn}}}</sup></sup>+1)]|[http://factordb.com/index.php?query={{#ifexpr:({{{GFNa}}}+{{{GFNb}}}) mod 2||(}}{{{GFNa}}}^2^{{{GFNn}}}%2B1{{#ifexpr:({{{GFNa}}}+{{{GFNb}}}) mod 2||)%2F2}} {{{GFNa}}}<sup>2<sup>{{{GFNn}}}</sup></sup>+1]}}}}|[http://factordb.com/index.php?query={{#ifexpr:({{{GFNa}}}+{{{GFNb}}}) mod 2||(}}{{{GFNa}}}^2^{{{GFNn}}}%2B{{{GFNb}}}^2^{{{GFNn}}}{{#ifexpr:({{{GFNa}}}+{{{GFNb}}}) mod 2||)%2F2}} {{{GFNa}}}<sup>2<sup>{{{GFNn}}}</sup></sup>+{{{GFNb}}}<sup>2<sup>{{{GFNn}}}</sup></sup>]}} {{#ifexpr:({{{GFNa}}}+{{{GFNb}}}) mod 2|| div 2}}| | |
− | {{!}} align="right"{{!}} <b> | + | {{!}} align="right"{{!}} <b>Number :</b> {{!}}{{!}} {{#ifeq:{{{GFNb}}}|1|{{#ifeq:{{{GFNa}}}|2|2<sup>2<sup>{{{GFNn}}}</sup></sup>+1|{{{GFNa}}}<sup>2<sup>{{{GFNn}}}</sup></sup>+1}}|{{{GFNa}}}<sup>2<sup>{{{GFNn}}}</sup></sup>+{{{GFNb}}}<sup>2<sup>{{{GFNn}}}</sup></sup>}} {{#ifexpr:({{{GFNa}}}+{{{GFNb}}}) mod 2|| div 2}} |
+ | }} | ||
|- | |- | ||
{{#if:{{{GFNDigits|}}}| | {{#if:{{{GFNDigits|}}}| | ||
Line 79: | Line 90: | ||
|- | |- | ||
{{#if:{{{GFNState|}}}| | {{#if:{{{GFNState|}}}| | ||
− | {{!}} align="right"{{!}} <b>State :</b> {{!}}{{!}} {{{GFNState}}} | + | {{!}} align="right"{{!}} <b>State :</b> {{!}}{{!}} {{GFN state|{{{GFNState}}}}} |
}} | }} | ||
|} | |} | ||
Line 92: | Line 103: | ||
|<nowiki /> | |<nowiki /> | ||
*{{#vardefine:k|{{#explode:{{#arrayindex:GFNlist|{{#var:i}}}}|,|0}}}}<!-- | *{{#vardefine:k|{{#explode:{{#arrayindex:GFNlist|{{#var:i}}}}|,|0}}}}<!-- | ||
+ | -->{{#ifeq:{{Is Long number|{{#var:k}}}}|1|{{#vardefine:k|{{Long number:{{#var:k}}-NS}}({{Long number:{{#var:k}}-DI}})}}}}<!-- | ||
-->{{#vardefine:n|{{#explode:{{#explode:{{#arrayindex:GFNlist|{{#var:i}}}}|,|1}}|#|0}}}}<!-- | -->{{#vardefine:n|{{#explode:{{#explode:{{#arrayindex:GFNlist|{{#var:i}}}}|,|1}}|#|0}}}}<!-- | ||
-->{{#vardefine:dat|}}<!-- | -->{{#vardefine:dat|}}<!-- | ||
-->{{#switch:{{#sub:{{#var:k}}|0|1}} | -->{{#switch:{{#sub:{{#var:k}}|0|1}} | ||
− | |C=Composite {{#if:{{#var:n}}|[http://factordb.com/index.php?id={{#var:n}} {{#var:k}}]{{#vardefine:facts|{{#var:facts}} * [http://factordb.com/index.php?id={{#var:n}} {{#var:k}}]}}|{{#var:k}}{{#vardefine:facts|{{#var:facts}} * {{#var:k}}}}}} | + | |C=Composite {{#vardefine:k|C<sub><{{#sub:{{#var:k}}|1}}></sub>}}{{#if:{{#var:n}}|[http://factordb.com/index.php?id={{#var:n}} {{#var:k}}]{{#vardefine:facts|{{#var:facts}} * [http://factordb.com/index.php?id={{#var:n}} {{#var:k}}]}}|{{#var:k}}{{#vardefine:facts|{{#var:facts}} * {{#var:k}}}}}} |
− | |P=Prime {{#if:{{#var:n}}|[http://factordb.com/index.php?id={{#var:n}} {{#var:k}}]{{#vardefine:facts|{{#var:facts}} * [http://factordb.com/index.php?id={{#var:n}} {{#var:k}}]}}|{{#var:k}}{{#vardefine:facts|{{#var:facts}} * {{#var:k}}}}}} | + | |P=Prime {{#vardefine:k|P<sub><{{#sub:{{#var:k}}|1}}></sub>}}{{#if:{{#var:n}}|[http://factordb.com/index.php?id={{#var:n}} {{#var:k}}]{{#vardefine:facts|{{#var:facts}} * [http://factordb.com/index.php?id={{#var:n}} {{#var:k}}]}}|{{#var:k}}{{#vardefine:facts|{{#var:facts}} * {{#var:k}}}}}} |
− | |#default={{NPr|{{#var:k}}|{{#var:n}}}} ([[GF Divisor {{#var:k}} {{#var:n}}|GF Divisor]]){{#ifexist:GF Divisor {{#var:k}} {{#var:n}}|{{#vardefine:dat|{{GFDivisor get disc|GF Divisor {{#var:k}} {{#var:n}}|{{{GFNa}}},{{{GFNb}}},}}}}{{#vardefine:factn|{{GP|GF Divisor {{#var:k}} {{#var:n}}|GFNumber}}}}{{#if:{{#var:factn}}|{{#vardefine:facts|{{#var:facts}} * {{#var:factn}}}}}}}} | + | |U=Unknown {{#vardefine:k|U<sub><{{#sub:{{#var:k}}|1}}></sub>}}{{#if:{{#var:n}}|[http://factordb.com/index.php?id={{#var:n}} {{#var:k}}]{{#vardefine:facts|{{#var:facts}} * [http://factordb.com/index.php?id={{#var:n}} {{#var:k}}]}}|{{#var:k}}{{#vardefine:facts|{{#var:facts}} * {{#var:k}}}}}} |
+ | |#default={{#if:{{#var:n}}|{{NPr|{{#var:k}}|{{#var:n}}}} ([[GF Divisor {{#var:k}} {{#var:n}}|GF Divisor]]){{#ifexist:GF Divisor {{#var:k}} {{#var:n}}|{{#vardefine:dat|{{GFDivisor get disc|GF Divisor {{#var:k}} {{#var:n}}|{{{GFNa}}},{{{GFNb}}},}}}}{{#vardefine:factn|{{GP|GF Divisor {{#var:k}} {{#var:n}}|GFNumber}}}}{{#ifeq:{{#sub:{{#var:factn}}|0|1}}|P|{{#vardefine:facts|{{#var:facts}} * P<sub><{{#sub:{{#var:factn}}|1}}></sub>}}|{{#if:{{#var:factn}}|{{#vardefine:facts|{{#var:facts}} * {{#ifeq:{{Is Long number|{{#var:factn}}}}|1|{{Long number:{{#var:factn}}-NL}}<sub><{{Long number:{{#var:factn}}-DI}}></sub>|{{#var:factn}}{{#ifexpr:{{#len:{{#var:factn}}}}>9|<sub><{{#len:{{#var:factn}}}}></sub>}}}}}}}}}}|{{#var:k}}{{#vardefine:facts|{{#var:facts}} * {{#var:k}}}}}}|{{#var:k}}{{#vardefine:facts|{{#var:facts}} * {{#var:k}}}}}} | ||
}}<!-- | }}<!-- | ||
− | -->{{# | + | -->{{#ifexpr:{{#len:{{#var:dat}}}}>0|, found {{#explode:{{#var:dat}}| |0}} by }}{{Contribs|{{#explode:{{#var:dat}}| |1}}|}} |
− | + | }}{{#ifeq:{{NAMESPACENUMBER}}|0|[[Category:Generalized Fermat number {{{GFNa}}} {{{GFNb}}} Nums]]}} | |
− | + | {{#if:{{#var:facts}}| | |
==Factorization== | ==Factorization== | ||
− | {{#vardefine:facts|{{#sub:{{#var:facts}}| | + | <span class="longline">{{#vardefine:facts|{{#sub:{{#var:facts}}|2}}}}{{#var:facts}}}}</span> |
</includeonly> | </includeonly> |
Latest revision as of 08:51, 16 September 2021
Description
Template Generalized Fermat number
Collect the data of a Generalized Fermat number a2n + b2n, for b=1 this is a Fermat number a2n + 1.
Prototype
{{Generalized Fermat number |GFNa= |GFNb= |GFNn= |GFNFDBid= |GFNDigits= |GFNFactors= |GFNState= |GFNRemarks= }}
Parameters
If 'GFNa'+'GFNb' is even, the numbers are always divisible by 2 and so 2 is not given as factor here.
If 'GFNFDBid' is given, a link to the FactorDB is created, otherwise only the number in standard notation is given.
For the case (a,b) = (8,1) the number for Fn(8,1) div 22n+1 = 42n − 22n + 1 is given.
See also
Example
{{Generalized Fermat number |GFNa=2 |GFNb=1 |GFNn=207 |GFNFDBid=1000000000002000017 |GFNDigits=1234 |GFNFactors= 3,5 3,209 7,14 15288227662166113,8 N1100000002618011261,9 P345 C1133,1100000000212123761 U12345,4545 |GFNState=CF |GFNRemarks=test }}
will create:
Current data
|
Remarks : |
test |
Factors
- Proth 3•25+1 (GF Divisor)
- Proth 3•2209+1 (GF Divisor), found 1956 by Raphael M. Robinson
- Proth 7•214+1 (GF Divisor), found 1877 by Ivan Mikheevich Pervushin, Édouard Lucas
- Proth 15288227662166113•28+1 (GF Divisor)
- Proth 138139700146349586211941790195...83(88)•29+1 (GF Divisor)
- Prime P<345>
- Composite C<1133>
- Unknown U<12345>
Factorization
97 * 2468256835981809063232453773836025757474103798450369795022913537<64> * 114689 * 3913786281514524929<19> * 707275264749309881405141965802671548079179711820351316861777644606207216944972589404100097<90> * P<345> * C<1133> * U<12345>