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

Difference between revisions of "Template:NVal"

From Prime-Wiki
Jump to: navigation, search
(show twin of Riesel/Proth with link to page)
(Twin as n=val)
(One intermediate revision by the same user not shown)
Line 58: Line 58:
 
           |W={{#vardefine:cnt|Woodall}}
 
           |W={{#vardefine:cnt|Woodall}}
 
           |T={{#vardefine:cnt|Twin {{#switch:{{#explode:{{PAGENAME}}||0}}
 
           |T={{#vardefine:cnt|Twin {{#switch:{{#explode:{{PAGENAME}}||0}}
                             |Riesel=[[Proth prime {{#explode:{{PAGENAME}}||-1}}|{{Kbn|+|{{#explode:{{PAGENAME}}||-1}}|{{#arrayindex:nvals|0}}}}]]
+
                             |Riesel=[[Proth prime {{#explode:{{PAGENAME}}||-1}}|n={{#arrayindex:nvals|0}}]]
                             |Proth=[[Riesel prime {{#explode:{{PAGENAME}}||-1}}|{{Kbn|{{#explode:{{PAGENAME}}||-1}}|{{#arrayindex:nvals|0}}}}]]
+
                             |Proth=[[Riesel prime {{#explode:{{PAGENAME}}||-1}}|n={{#arrayindex:nvals|0}}]]
 
                             |#default=}}}}
 
                             |#default=}}}}
           |S={{#vardefine:cnt|[[Sophie Germain prime|Sophie Germain]]}}
+
           |S={{#vardefine:cnt|[[Sophie Germain prime|Sophie Germain]] n={{#arrayindex:nvals|0}}}}
 
           |#default={{#vardefine:cnt|ERR}}
 
           |#default={{#vardefine:cnt|ERR}}
 
         }}<!--
 
         }}<!--

Revision as of 14:55, 30 July 2020

Purpose

Displays a value given in a list of numbers with different options which are seperated by ;.

Options

  1. n-value: only the value is displayed
  2. n-value;Top5000-ID: the n-value is given with a link to the The Prime Pages
  3. n-value;T:<type/s>: the n-value is given with a special type
types are denoted as
T: Twin prime
W: (generalized) Woodall prime
C: (generalized) Cullen prime
S: Sophie Germain prime
  1. n-value;C:<any comment to this value>: given a comment can contain page links and wiki syntax

A combination of these options i possible, but

  • only the n-value is recommended
  • the second parameter can only be the Top5000 ID
  • other special types as given will displays as "ERR"

Every "T:" or "C:" value given will be displayed as a text reference

Examples

12345
631;T:SC;C:Test
653490;121779;T:TX
688042;121867;T:CTW
678901;121905;C:Divides: F(33)
695631;121906;T:WTC;C:[[Test]]<br>'''Divides:''' F(38), GF(38,3), GF(33,6), GF(38,12)

produces the following outputs (with the notes at the bottom of this page):

Notes

  1. S.G. n=631, Cullen, Test
  2. Twin n=653490, ERR
  3. Cullen, Twin n=688042, Woodall
  4. Divides: F(33)
  5. Woodall, Twin n=695631, Cullen, Test
    Divides: F(38), GF(38,3), GF(33,6), GF(38,12)