Navigation
Topics Register • News • History • How to • Sequences statistics • Template prototypes

Difference between revisions of "Template:GNn"

From Prime-Wiki
Jump to: navigation, search
(new)
 
(leading space removed)
 
Line 10: Line 10:
 
Get the 17th n-value from "Riesel prime 1" primes:
 
Get the 17th n-value from "Riesel prime 1" primes:
 
*<nowiki>{{GNn|Riesel prime 1|17}}</nowiki> results in
 
*<nowiki>{{GNn|Riesel prime 1|17}}</nowiki> results in
:{{GNn|Riesel prime 1|17}}
+
:"{{GNn|Riesel prime 1|17}}"
  
 
100th prime of Riesel prime k=465:
 
100th prime of Riesel prime k=465:
 
*<nowiki>{{GNn|Riesel prime 465|100}}</nowiki> results in
 
*<nowiki>{{GNn|Riesel prime 465|100}}</nowiki> results in
:{{GNn|Riesel prime 465|100}}
+
:"{{GNn|Riesel prime 465|100}}"
  
 
Proth prime example:
 
Proth prime example:
 
*<nowiki>{{GNn|Proth prime 3|49}}</nowiki> results in
 
*<nowiki>{{GNn|Proth prime 3|49}}</nowiki> results in
:{{GNn|Proth prime 3|49}}
+
:"{{GNn|Proth prime 3|49}}"
  
 
<index> is greater than possible value:
 
<index> is greater than possible value:
Line 24: Line 24:
 
:"{{GNn|Riesel prime 465|200}}"
 
:"{{GNn|Riesel prime 465|200}}"
 
[[Category:Templates]]
 
[[Category:Templates]]
</noinclude><includeonly>{{#ifexist:{{{1}}}|{{#vardefine:n_|{{NVal list|{{GP|{{{1}}}|{{#sub:{{{1}}}|0|1}}Nlist}}|short}}}}}}{{#arraydefine:nn_|{{#var:n_}}}}{{#vardefine:cnt_|{{#arraysize:nn_}}}}{{#ifexpr:{{{2}}}>{{#var:cnt_}}||{{#arrayindex:nn_|{{#expr:{{{2}}}-1}}}}}}</includeonly>
+
</noinclude><includeonly>{{#ifexist:{{{1}}}|{{#vardefine:n_|{{NVal list|{{GP|{{{1}}}|{{#sub:{{{1}}}|0|1}}Nlist}}|short}}}}}}{{#arraydefine:nn_|{{#var:n_}}|,&#32;}}{{#ifexpr:{{{2}}}>{{#arraysize:nn_}}||{{#arrayindex:nn_|{{#expr:{{{2}}}-1}}}}}}</includeonly>

Latest revision as of 09:41, 18 June 2020

Description

Get a specific n-value of a template by name if exists, "" (null) otherwise.

  • Just only for Riesel or Proth primes by now!

Call

{{GNn|<prime name>|<index>}}

Examples

Get the 17th n-value from "Riesel prime 1" primes:

  • {{GNn|Riesel prime 1|17}} results in
"2281"

100th prime of Riesel prime k=465:

  • {{GNn|Riesel prime 465|100}} results in
"928115"

Proth prime example:

  • {{GNn|Proth prime 3|49}} results in
"10829346"

<index> is greater than possible value:

  • {{GNn|Riesel prime 465|200}} results in
""