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"

From Prime-Wiki
Jump to: navigation, search
(span instead div)
m
 
Line 18: Line 18:
 
</pre>
 
</pre>
  
==Example==
+
==Examples==
<pre>
+
:<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|8415}}
+
:<code><nowiki>{{K-type|Riesel|43}}</nowiki></code> will produce {{K-type|Riesel|43}} because {{Vk}}=43 is low weight.
</pre>
 
will produce
 
:{{K-type|Riesel|8415}}
 
because {{Vk}}=8415 is a multiple of 3, 15 and 2805.
 
 
[[Category:Prime collections]]
 
[[Category:Prime collections]]
 
</noinclude><includeonly><span style="white-space:nowrap;"><!--
 
</noinclude><includeonly><span style="white-space:nowrap;"><!--
Line 31: Line 27:
 
-->{{#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 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>}}<!--
 
-->{{#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>}}<!--
-->{{#if:{{GP|{{{1}}} prime 2 {{{2}}}|RNash}}|{{#ifexpr:{{#dpl:title={{{1}}} prime 2 {{{2}}}|skipthispage=no|include={ {{{1}}} prime}:{{#sub:{{{1}}}|0|1}}Nash}}<1000|<span style="width:2.2em; text-align: center; background:Cyan; display:inline-block;" title="Low weight">[[{{{1}}} 2 Low-weight|Low]]</span>|}}|}}</span></includeonly>
+
-->{{#switch:{{{1}}}
 +
|Riesel={{#if:{{GP|{{{1}}} prime 2 {{{2}}}|RNash}}|{{#ifexpr:{{#dpl:title={{{1}}} prime 2 {{{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}}} 2 Low-weight|Low]]</span>|}}|}}
 +
|Proth={{#if:{{GP|{{{1}}} prime 2 {{{2}}}|PNash}}|{{#ifexpr:{{#dpl:title={{{1}}} prime 2 {{{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}}} 2 Low-weight|Low]]</span>|}}|}}}}</span></includeonly>

Latest revision as of 17:08, 3 August 2021

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
{{K-type|Riesel/Proth|<k-value>}}

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.