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"
(Twin as n=val) |
(use <var>) |
||
Line 4: | Line 4: | ||
==Options== | ==Options== | ||
− | #{{Key|n-value}}: only the value is displayed | + | #{{Key|<var>n</var>-value}}: only the value is displayed |
− | #{{Key|n-value;Top5000-ID}}: the n-value is given with a link to the [[The Prime Pages]] | + | #{{Key|<var>n</var>-value;Top5000-ID}}: the <var>n</var>-value is given with a link to the [[The Prime Pages]] |
− | #{{Key|n-value;T:<type/s>}}: the n-value is given with a special type | + | #{{Key|<var>n</var>-value;T:<type/s>}}: the <var>n</var>-value is given with a special type |
::types are denoted as | ::types are denoted as | ||
::T: [[Twin prime]] | ::T: [[Twin prime]] | ||
Line 12: | Line 12: | ||
::C: [[Cullen number|(generalized) Cullen prime]] | ::C: [[Cullen number|(generalized) Cullen prime]] | ||
::S: [[Sophie Germain prime]] | ::S: [[Sophie Germain prime]] | ||
− | #<li value="4">{{Key|n-value;C:<any comment to this value>}}: given a comment can contain page links and wiki syntax</li> | + | #<li value="4">{{Key|<var>n</var>-value;C:<any comment to this value>}}: given a comment can contain page links and wiki syntax</li> |
− | A combination of these options | + | A combination of these options is possible, but |
− | *only the n-value is recommended | + | *only the <var>n</var>-value is recommended |
*the second parameter can only be the Top5000 ID | *the second parameter can only be the Top5000 ID | ||
*other special types as given will displays as "ERR" | *other special types as given will displays as "ERR" | ||
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}}|n={{#arrayindex:nvals|0}}]] | + | |Riesel=[[Proth prime {{#explode:{{PAGENAME}}||-1}}|<var>n</var>={{#arrayindex:nvals|0}}]] |
− | |Proth=[[Riesel prime {{#explode:{{PAGENAME}}||-1}}|n={{#arrayindex:nvals|0}}]] | + | |Proth=[[Riesel prime {{#explode:{{PAGENAME}}||-1}}|<var>n</var>={{#arrayindex:nvals|0}}]] |
− | |#default=}}}} | + | |#default=<var>n</var>={{#arrayindex:nvals|0}}}}}} |
− | |S={{#vardefine:cnt|[[Sophie Germain prime| | + | |S={{#vardefine:cnt|[[Sophie Germain prime|S.G.]] <var>n</var>={{#arrayindex:nvals|0}}}} |
− | |#default={{#vardefine:cnt|ERR}} | + | |#default={{#vardefine:cnt|{{C|red|'''ERR'''}}}} |
}}<!-- | }}<!-- | ||
-->{{#if:{{#var:c1}}|{{#vardefine:c1|{{#var:c1}},<nowiki> </nowiki>{{#var:cnt}}}}|{{#vardefine:c1|{{#var:cnt}}}}<!-- | -->{{#if:{{#var:c1}}|{{#vardefine:c1|{{#var:c1}},<nowiki> </nowiki>{{#var:cnt}}}}|{{#vardefine:c1|{{#var:cnt}}}}<!-- |
Revision as of 11:45, 10 August 2020
Contents
Purpose
Displays a value given in a list of numbers with different options which are seperated by ;.
Options
- n-value: only the value is displayed
- n-value;Top5000-ID: the n-value is given with a link to the The Prime Pages
- 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
- 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: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):