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:NVal"

From Prime-Wiki
Jump to: navigation, search
(template Vn)
(number links)
 
(5 intermediate revisions by the same user not shown)
Line 11: Line 11:
 
::W: [[Woodall number|(generalized) Woodall prime]]
 
::W: [[Woodall number|(generalized) Woodall prime]]
 
::C: [[Cullen number|(generalized) Cullen prime]]
 
::C: [[Cullen number|(generalized) Cullen prime]]
::G: link to a [[:Category:GF Divisor|GF Divisor]]
+
::G: link to a [[:Category:GF Divisors|GF Divisor]]
 +
::R: [[Probable prime]]
 
::S: [[Sophie Germain prime]]
 
::S: [[Sophie Germain prime]]
 
#<li value="4">{{Key|{{Vn}}-value;C:<any comment to this value>}}: given a comment can contain page links and wiki syntax</li>
 
#<li value="4">{{Key|{{Vn}}-value;C:<any comment to this value>}}: given a comment can contain page links and wiki syntax</li>
Line 27: Line 28:
 
631;T:CSG;C:Test
 
631;T:CSG;C:Test
 
653490;121779;T:TX
 
653490;121779;T:TX
688042;121867;T:CTW
+
688042;121867;T:CTWR
 
678901;121905;C:Divides: F(33)
 
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)
 
695631;121906;T:WTC;C:[[Test]]<br>'''Divides:''' F(38), GF(38,3), GF(33,6), GF(38,12)
Line 36: Line 37:
 
*{{NVal|631;T:CSG;C:Test}}
 
*{{NVal|631;T:CSG;C:Test}}
 
*{{NVal|653490;121779;T:TX}}
 
*{{NVal|653490;121779;T:TX}}
*{{NVal|688042;121867;T:CTW}}
+
*{{NVal|688042;121867;T:CTWR}}
 
*{{NVal|678901;121905;C:Divides: F(33)}}
 
*{{NVal|678901;121905;C:Divides: F(33)}}
 
*{{NVal|695631;121906;T:WTC;C:[[Test]]<br>'''Divides:''' F(38), GF(38,3), GF(33,6), GF(38,12)}}
 
*{{NVal|695631;121906;T:WTC;C:[[Test]]<br>'''Divides:''' F(38), GF(38,3), GF(33,6), GF(38,12)}}
Line 56: Line 57:
 
       |<nowiki /><!--
 
       |<nowiki /><!--
 
     -->{{#switch:{{#sub:{{#var:part}}|{{#var:j}}|1}}
 
     -->{{#switch:{{#sub:{{#var:part}}|{{#var:j}}|1}}
           |C={{#vardefine:cnt|Cullen}}
+
           |C={{#vardefine:cnt|[[Cullen prime|Cullen]]}}
           |G={{#vardefine:cnt|{{Is GF Divisor|{{#explode:{{PAGENAME}}||-1}}|{{#arrayindex:nvals|0}}}}}}
+
           |G={{#vardefine:cnt|{{#ifeq:{{NAMESPACENUMBER}}|10|Is [[GF Divisor 5 3|GF Divisor]]|{{Is GF Divisor|{{#explode:{{PAGENAME}}||-1}}|{{#arrayindex:nvals|0}}}}}}}}
           |W={{#vardefine:cnt|Woodall}}
+
           |W={{#vardefine:cnt|[[Woodall prime|Woodall]]}}
           |T={{#vardefine:cnt|Twin {{#switch:{{#explode:{{PAGENAME}}||0}}
+
           |T={{#vardefine:cnt|[[Twin prime|Twin]] {{#switch:{{#explode:{{PAGENAME}}||0}}
                             |Riesel=[[Proth prime {{#explode:{{PAGENAME}}||-1}}|{{Vn}}={{#arrayindex:nvals|0}}]]
+
                             |Riesel=[[Proth prime {{#explode:{{PAGENAME}}||2}} {{#explode:{{PAGENAME}}||-1}}|{{Vn}}={{#arrayindex:nvals|0}}]]
                             |Proth=[[Riesel prime {{#explode:{{PAGENAME}}||-1}}|{{Vn}}={{#arrayindex:nvals|0}}]]
+
                             |Proth=[[Riesel prime {{#explode:{{PAGENAME}}||2}} {{#explode:{{PAGENAME}}||-1}}|{{Vn}}={{#arrayindex:nvals|0}}]]
 
                             |#default={{Vn}}={{#arrayindex:nvals|0}}}}}}
 
                             |#default={{Vn}}={{#arrayindex:nvals|0}}}}}}
           |S={{#vardefine:cnt|[[Sophie Germain prime|S.G.]] {{Vn}}={{#arrayindex:nvals|0}}}}
+
          |R={{#vardefine:cnt|[[Probable prime]]}}
 +
           |S={{#vardefine:cnt|[[Sophie Germain prime|Sophie Germain]] {{Vn}}={{#arrayindex:nvals|0}}}}
 
           |#default={{#vardefine:cnt|{{C|red|'''ERR'''}}}}
 
           |#default={{#vardefine:cnt|{{C|red|'''ERR'''}}}}
 
         }}<!--
 
         }}<!--

Latest revision as of 22:42, 3 November 2024

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
G: link to a GF Divisor
R: Probable 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 is 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:CSG;C:Test
653490;121779;T:TX
688042;121867;T:CTWR
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. Cullen, Sophie Germain n=631, Is GF Divisor, Test
  2. Twin n=653490, ERR
  3. Cullen, Twin n=688042, Woodall, Probable prime
  4. Divides: F(33)
  5. Woodall, Twin n=695631, Cullen, Test
    Divides: F(38), GF(38,3), GF(33,6), GF(38,12)