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:K-type"
(w/o ifexist for Low weight) |
(test Proth added, no errors) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
==Purpose== | ==Purpose== | ||
− | Prints the type of a Riesel/Proth | + | Prints the type of a Riesel/Proth {{Vk}}-value with linked category. |
==Definitions== | ==Definitions== | ||
− | *<div style="width:1. | + | *<div style="width:1.6em; text-align: center; background:HotPink; display:inline-block;" title="3k">3</div>: 3k value ({{Vk}} is a multiple of 3) |
− | *<div style="width: | + | *<div style="width:1.6em; text-align: center; background:Pink; display:inline-block;" title="15k">15</div>: 15k value ({{Vk}} is a multiple of 15) |
− | *<div style="width: | + | *<div style="width:2.6em; text-align: center; background:CornflowerBlue; display:inline-block;" title="2145k">2145</div>: 2145k value ({{Vk}} is a multiple of 2145) |
− | *<div style="width: | + | *<div style="width:2.6em; text-align: center; background:GreenYellow; display:inline-block;" title="2805k">2805</div>: 2805k value ({{Vk}} is a multiple of 2805) |
− | *<div style="width: | + | *<div style="width:2.2em; text-align: center; background:Cyan; display:inline-block;" title="Low weight">Low</div>: Low Nash value ([[Nash weight]] < 1000) |
+ | <!--*<div style="width:2.2em; text-align: center; background:Coral; display:inline-block;" title="Riesel number">Ris</div>: Riesel number (only on Riesel-side)--> | ||
==Calling== | ==Calling== | ||
*First unnamed parameter is the type: Riesel or Proth | *First unnamed parameter is the type: Riesel or Proth | ||
− | *Second parameter is the | + | *Second parameter is the {{Vk}}-value |
+ | *Third parameter is the base, if not given base=2 is taken | ||
<pre> | <pre> | ||
− | {{K-type|Riesel/Proth|<k-value>}} | + | {{K-type|Riesel/Proth|<k-value>|[<base>]}} |
</pre> | </pre> | ||
− | == | + | ==Examples== |
− | < | + | *<code><nowiki>{{K-type|Riesel|36465}}</nowiki></code> will produce {{K-type|Riesel|36465}} because {{Vk}}=36465 is a multiple of 3, 15, 2145, and 2805. |
− | {{K-type|Riesel| | + | *<code><nowiki>{{K-type|Riesel|43}}</nowiki></code> will produce {{K-type|Riesel|43}} because {{Vk}}=43 is low weight. |
− | </ | + | *<code><nowiki>{{K-type|Riesel|4906|5}}</nowiki></code> will produce {{K-type|Riesel|4906|5}} because of low Nash weight={{GP|Riesel prime 5 4906|RNash}}. |
− | will produce | + | *<code><nowiki>{{K-type|Proth|9267}}</nowiki></code> / <code><nowiki>{{K-type|Proth|6436|5}}</nowiki></code> will produce {{K-type|Proth|9267}} / {{K-type|Proth|6436|5}} for Proth primes. |
− | |||
− | because | ||
[[Category:Prime collections]] | [[Category:Prime collections]] | ||
− | </noinclude><includeonly>< | + | </noinclude><includeonly><span style="white-space:nowrap;"><!-- |
− | -->{{#ifexpr:{{{2}}} mod | + | -->{{#if:{{{3|}}}|{{#vardefine:_bas|{{{3}}}}}|{{#vardefine:_bas|2}}}}<!-- |
− | -->{{#ifexpr:{{{2}}} mod | + | -->{{#ifexpr:{{{2}}} mod 3||<span style="width:1.6em; text-align: center; background:HotPink; display:inline-block;" title="3k">[[{{{1}}} 2 3k-value|3]]</span>}}<!-- |
− | -->{{# | + | -->{{#ifexpr:{{{2}}} mod 15||<span style="width:1.6em; text-align: center; background:Pink; display:inline-block;" title="15k">[[{{{1}}} 2 15k-value|15]]</span>}}<!-- |
− | {{# | + | -->{{#ifexpr:{{{2}}} mod 2145||<span style="width:2.6em; text-align: center; background:CornflowerBlue; display:inline-block;" title="2145k">[[{{{1}}} 2 2145k-value|2145]]</span>}}<!-- |
− | + | -->{{#ifexpr:{{{2}}} mod 2805||<span style="width:2.6em; text-align: center; background:GreenYellow; display:inline-block;" title="2805k">[[{{{1}}} 2 2805k-value|2805]]</span>}}<!-- | |
+ | -->{{#switch:{{{1}}} | ||
+ | |Riesel={{#if:{{GP|{{{1}}} prime {{#var:_bas}} {{{2}}}|RNash}}|{{#ifexpr:{{#dpl:title={{{1}}} prime {{#var:_bas}} {{{2}}}|skipthispage=no|include={ {{{1}}} prime}:RNash}}<1000|<span style="width:2.2em; text-align: center; background:Cyan; display:inline-block;" title="Low weight">[[{{{1}}} {{#var:_bas}} Low-weight|Low]]</span>|}}|}} | ||
+ | |Proth={{#if:{{GP|{{{1}}} prime {{#var:_bas}} {{{2}}}|PNash}}|{{#ifexpr:{{#dpl:title={{{1}}} prime {{#var:_bas}} {{{2}}}|skipthispage=no|include={ {{{1}}} prime}:PNash}}<1000|<span style="width:2.2em; text-align: center; background:Cyan; display:inline-block;" title="Low weight">[[{{{1}}} {{#var:_bas}} Low-weight|Low]]</span>|}}|}}}}</span></includeonly> |
Latest revision as of 15:03, 30 May 2024
Contents
Purpose
Prints the type of a Riesel/Proth k-value with linked category.
Definitions
- 3: 3k value (k is a multiple of 3)
- 15: 15k value (k is a multiple of 15)
- 2145: 2145k value (k is a multiple of 2145)
- 2805: 2805k value (k is a multiple of 2805)
- Low: Low Nash value (Nash weight < 1000)
Calling
- First unnamed parameter is the type: Riesel or Proth
- Second parameter is the k-value
- Third parameter is the base, if not given base=2 is taken
{{K-type|Riesel/Proth|<k-value>|[<base>]}}
Examples
{{K-type|Riesel|36465}}
will produce 31521452805 because k=36465 is a multiple of 3, 15, 2145, and 2805.{{K-type|Riesel|43}}
will produce Low because k=43 is low weight.{{K-type|Riesel|4906|5}}
will produce Low because of low Nash weight=468.{{K-type|Proth|9267}}
/{{K-type|Proth|6436|5}}
will produce 3Low / Low for Proth primes.