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:GFN factorization"

From Prime-Wiki
Jump to: navigation, search
(new)
 
(Long number as k-value possible)
Line 7: Line 7:
 
<nowiki>{{GFN factorization|Generalized Fermat number 2 1 38}}</nowiki> gives
 
<nowiki>{{GFN factorization|Generalized Fermat number 2 1 38}}</nowiki> gives
 
:{{GFN factorization|Generalized Fermat number 2 1 38}}
 
:{{GFN factorization|Generalized Fermat number 2 1 38}}
 +
 +
<nowiki>{{GFN factorization|Generalized Fermat number 2 1 7}}</nowiki> gives
 +
:{{GFN factorization|Generalized Fermat number 2 1 7}}
 
[[Category:Prime collections]]</noinclude><includeonly>{{#vardefine:facts|}}{{#arraydefine:GFNlist|{{GP|{{{1}}}|GFNFactors}}|/\n/}}{{#loop:i|0|{{#arraysize:GFNlist}}
 
[[Category:Prime collections]]</noinclude><includeonly>{{#vardefine:facts|}}{{#arraydefine:GFNlist|{{GP|{{{1}}}|GFNFactors}}|/\n/}}{{#loop:i|0|{{#arraysize:GFNlist}}
 
|<nowiki />
 
|<nowiki />
Line 13: Line 16:
 
-->{{#switch:{{#sub:{{#var:k}}|0|1}}
 
-->{{#switch:{{#sub:{{#var:k}}|0|1}}
 
|C|P={{#if:{{#var:n}}|{{#vardefine:facts|{{#var:facts}} * [http://factordb.com/index.php?id={{#var:n}} {{#var:k}}]}}|{{#vardefine:facts|{{#var:facts}} * {{#var:k}}}}}}
 
|C|P={{#if:{{#var:n}}|{{#vardefine:facts|{{#var:facts}} * [http://factordb.com/index.php?id={{#var:n}} {{#var:k}}]}}|{{#vardefine:facts|{{#var:facts}} * {{#var:k}}}}}}
|#default={{#if:{{#var:n}}|{{#ifexist:GF Divisor {{#var:k}} {{#var:n}}|{{#vardefine:factn|{{GP|GF Divisor {{#var:k}} {{#var:n}}|GFNumber}}}}{{#if:{{#var:factn}}|{{#vardefine:facts|{{#var:facts}} * {{#var:factn}}}}}}}}|{{#vardefine:facts|{{#var:facts}} * {{#var:k}}}}}}}}}}{{#vardefine:facts|{{#sub:{{#var:facts}}|2}}}}{{#var:facts}}</includeonly>
+
|N={{#ifexist:GF Divisor {{Long number:{{#var:k}}-NS}} {{#var:n}}|{{#vardefine:factn|{{GP|GF Divisor {{Long number:{{#var:k}}-NS}} {{#var:n}}|GFNumber}}}}{{#vardefine:facts|{{#var:facts}} * {{Long number:{{#var:factn}}-NL}}<sub><{{Long number:{{#var:factn}}-DI}}></sub>}}}}
 +
|#default={{#if:{{#var:n}}|{{#ifexist:GF Divisor {{#var:k}} {{#var:n}}|{{#vardefine:factn|{{GP|GF Divisor {{#var:k}} {{#var:n}}|GFNumber}}}}{{#if:{{#var:factn}}|{{#vardefine:facts|{{#var:facts}} * {{#var:factn}}{{#ifexpr:{{#len:{{#var:factn}}}}>9|<sub><{{#len:{{#var:factn}}}}></sub>}}}}}}}}|{{#vardefine:facts|{{#var:facts}} * {{#var:k}}}}}}}}}}{{#vardefine:facts|{{#sub:{{#var:facts}}|2}}}}{{#var:facts}}</includeonly>

Revision as of 08:51, 2 July 2021

Purpose

Explanations

Example

{{GFN factorization|Generalized Fermat number 2 1 38}} gives

6597069766657<13> * 2917004348489729<16>

{{GFN factorization|Generalized Fermat number 2 1 7}} gives

59649589127497217<17> * 5704689200685129054721<22>