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"

From Prime-Wiki
Jump to: navigation, search
m
(data from GF Disvisors)
Line 32: Line 32:
 
|GFNDigits=1234
 
|GFNDigits=1234
 
|GFNFactors=
 
|GFNFactors=
7,14#1877#Ivan Pervushin;Édouard Lucas
+
3,41
17353230210429594579133099699123162989482444520899,15#2010-03-27#Michael Vang
+
7,14
 +
17353230210429594579133099699123162989482444520899,15
 
C1133,1100000000212123761
 
C1133,1100000000212123761
 
P345,1100000000212123762
 
P345,1100000000212123762
Line 48: Line 49:
 
|GFNDigits=1234
 
|GFNDigits=1234
 
|GFNFactors=
 
|GFNFactors=
7,14#1877#Ivan Pervushin;Édouard Lucas
+
3,41
17353230210429594579133099699123162989482444520899,15#2010-03-27#Michael Vang
+
7,14
 +
17353230210429594579133099699123162989482444520899,15
 
C1133,1100000000212123761
 
C1133,1100000000212123761
 
P345,1100000000212123762
 
P345,1100000000212123762
Line 87: Line 89:
 
}}
 
}}
 
==Factors==
 
==Factors==
{{#arraydefine:list|{{{GFNFactors}}}|/\n/}}{{#loop:i|0|{{#arraysize:list}}
+
{{#arraydefine:GFNlist|{{{GFNFactors}}}|/\n/}}{{#loop:i|0|{{#arraysize:GFNlist}}
 
|<nowiki />
 
|<nowiki />
*{{#vardefine:k|{{#explode:{{#arrayindex:list|{{#var:i}}}}|,|0}}}}<!--
+
*{{#vardefine:k|{{#explode:{{#arrayindex:GFNlist|{{#var:i}}}}|,|0}}}}<!--
-->{{#vardefine:n|{{#explode:{{#explode:{{#arrayindex:list|{{#var:i}}}}|,|1}}|#|0}}}}<!--
+
-->{{#vardefine:n|{{#explode:{{#explode:{{#arrayindex:GFNlist|{{#var:i}}}}|,|1}}|#|0}}}}<!--
-->{{#vardefine:dat|{{#explode:{{#arrayindex:list|{{#var:i}}}}|#|1}}}}<!--
+
-->{{#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}}]|{{#var:k}}}}
 
|C=Composite {{#if:{{#var:n}}|[http://factordb.com/index.php?id={{#var:n}} {{#var:k}}]|{{#var:k}}}}
 
|P=Prime {{#if:{{#var:n}}|[http://factordb.com/index.php?id={{#var:n}} {{#var:k}}]|{{#var:k}}}}
 
|P=Prime {{#if:{{#var:n}}|[http://factordb.com/index.php?id={{#var:n}} {{#var:k}}]|{{#var:k}}}}
|#default={{NPr|{{#var:k}}|{{#var:n}}}}
+
|#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}}},}}}}}}
 
}}<!--
 
}}<!--
-->{{#if:{{#var:dat}}|, found {{#var:dat}} by&#32;}}{{#arraydefine:disc|{{#explode:{{#arrayindex:list|{{#var:i}}}}|#|2}}|/;/}}{{#arrayprint:disc|,&#32;|@@@|[[@@@]]}}<!--
+
-->{{#if:{{#var:dat}}|, found {{#explode:{{#var:dat}}|&#32;|0}} by&#32;}}{{#arraydefine:disc|{{#explode:{{#var:dat}}|&#32;|1}}|/;/}}{{#arrayprint:disc|,&#32;|@@@|[[@@@]]}}<!--
 
-->{{#ifeq:{{NAMESPACENUMBER}}|0|[[Category:Generalized Fermat number {{{GFNa}}} {{{GFNb}}}]]}}
 
-->{{#ifeq:{{NAMESPACENUMBER}}|0|[[Category:Generalized Fermat number {{{GFNa}}} {{{GFNb}}}]]}}
 
}}</includeonly>
 
}}</includeonly>

Revision as of 10:54, 22 June 2021

Description

Template Generalized Fermat number

Collect the data of a Generalized Fermat number (for b=1 this is a Fermat number).

Prototype

{{Generalized Fermat number
|GFNa=
|GFNb=
|GFNn=
|GFNFDBid=
|GFNDigits=
|GFNFactors=
|GFNState=
|GFNRemarks=
}}

Parameters

See also

Example

{{Generalized Fermat number
|GFNa=2
|GFNb=1
|GFNn=207
|GFNFDBid=1000000000002000017
|GFNDigits=1234
|GFNFactors=
3,41
7,14
17353230210429594579133099699123162989482444520899,15
C1133,1100000000212123761
P345,1100000000212123762
|GFNState=Composite
|GFNRemarks=test
}}

will create:

Current data

a b n : 2 1 207
FactorDB : ID: 1000000000002000017 / Formula: 22207+1
Digits : 1234
State : ERR
Remarks :
test

Factors

Factorization

6597069766657<13> * 114689 * 17353230210429594579133099699123162989482444520899 * C<1133> * P<345>