**Navigation**

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

# Difference between revisions of "Template:NVal"

(cat. changed) |
m |
||

(8 intermediate revisions by the same user not shown) | |||

Line 4: | Line 4: | ||

==Options== | ==Options== | ||

− | #{{Key| | + | #{{Key|{{Vn}}-value}}: only the value is displayed |

− | #{{Key| | + | #{{Key|{{Vn}}-value;Top5000-ID}}: the {{Vn}}-value is given with a link to the [[The Prime Pages]] |

− | #{{Key| | + | #{{Key|{{Vn}}-value;T:<type/s>}}: the {{Vn}}-value is given with a special type |

::types are denoted as | ::types are denoted as | ||

::T: [[Twin prime]] | ::T: [[Twin prime]] | ||

::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]] | ||

::S: [[Sophie Germain prime]] | ::S: [[Sophie Germain prime]] | ||

− | #<li value="4">{{Key| | + | #<li value="4">{{Key|{{Vn}}-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 | + | *only the {{Vn}}-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 24: | Line 25: | ||

<pre> | <pre> | ||

12345 | 12345 | ||

− | 631;T: | + | 631;T:CSG;C:Test |

653490;121779;T:TX | 653490;121779;T:TX | ||

688042;121867;T:CTW | 688042;121867;T:CTW | ||

Line 33: | Line 34: | ||

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

*{{NVal|12345}} | *{{NVal|12345}} | ||

− | *{{NVal|631;T: | + | *{{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:CTW}} | ||

Line 56: | Line 57: | ||

-->{{#switch:{{#sub:{{#var:part}}|{{#var:j}}|1}} | -->{{#switch:{{#sub:{{#var:part}}|{{#var:j}}|1}} | ||

|C={{#vardefine:cnt|Cullen}} | |C={{#vardefine:cnt|Cullen}} | ||

+ | |G={{#vardefine:cnt|{{Is GF Divisor|{{#explode:{{PAGENAME}}||-1}}|{{#arrayindex:nvals|0}}}}}} | ||

|W={{#vardefine:cnt|Woodall}} | |W={{#vardefine:cnt|Woodall}} | ||

− | |T={{#vardefine:cnt|Twin}} | + | |T={{#vardefine:cnt|Twin {{#switch:{{#explode:{{PAGENAME}}||0}} |

− | |S={{#vardefine:cnt|Sophie | + | |Riesel=[[Proth prime 2 {{#explode:{{PAGENAME}}||-1}}|{{Vn}}={{#arrayindex:nvals|0}}]] |

− | |#default={{#vardefine:cnt|ERR}} | + | |Proth=[[Riesel prime 2 {{#explode:{{PAGENAME}}||-1}}|{{Vn}}={{#arrayindex:nvals|0}}]] |

+ | |#default={{Vn}}={{#arrayindex:nvals|0}}}}}} | ||

+ | |S={{#vardefine:cnt|[[Sophie Germain prime|S.G.]] {{Vn}}={{#arrayindex:nvals|0}}}} | ||

+ | |#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}}}}<!-- |

## Latest revision as of 08:03, 15 July 2021

## Contents

## Purpose

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

## Options

: only the value is displayed`n`-value: the`n`-value;Top5000-ID`n`-value is given with a link to the The Prime Pages: the`n`-value;T:<type/s>`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
- S: Sophie Germain prime

: given a comment can contain page links and wiki syntax`n`-value;C:<any comment to this value>

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: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):