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
(Long number as k-value possible)
m
Line 17: Line 17:
 
|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}}}}}}
 
|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>}}}}
 
|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>
+
|#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}} * {{#ifeq:{{#sub:{{#var:factn}}|0|1}}|N|{{Long number:{{#var:factn}}-NL}}|{{#var:factn}}}}{{#ifexpr:{{#len:{{#var:factn}}}}>9|<sub><{{#ifeq:{{#sub:{{#var:factn}}|0|1}}|N|{{Long number:{{#var:factn}}-DI}}|{{#len:{{#var:factn}}}}}}></sub>}}}}}}}}|{{#vardefine:facts|{{#var:facts}} * {{#var:k}}}}}}}}}}{{#vardefine:facts|{{#sub:{{#var:facts}}|2}}}}{{#var:facts}}</includeonly>

Revision as of 19:58, 6 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>