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:Carol-Kynea prime"

From Prime-Wiki
Jump to: navigation, search
m (Karbon moved page Template:CarolKyneaBase to Template:Carol-Kynea prime without leaving a redirect: name)
(class)
 
(32 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
 
==Description==
 
==Description==
Template CarolKyneaBase
+
Template Carol-Kynea prime
  
 
Display of current data for Carol/Kynea-type base.
 
Display of current data for Carol/Kynea-type base.
  
==Calling==
+
Notes:
 +
:The page title is displayed with the formula.
 +
:The category [[:Category:Carol-Kynea prime|Carol-Kynea prime]] is set.
 +
:If no Carol primes are given, the page is categorized into [[:Category:Carol-Kynea without Carol‎|Carol-Kynea without Carol‎]].
 +
:If no Kynea primes are given, the page is categorized into [[:Category:Carol-Kynea without Kynea|Carol-Kynea without Kynea]].
 +
:If no primes are given at all, the page is categorized into [[:Category:Carol-Kynea without both|Carol-Kynea without both]].
 +
:If <CKRemarks> contains "Power" the page is categorized into [[:Category:Carol-Kynea power-of|Carol-Kynea power-of]].
 +
 
 +
==Prototype==
 
<pre>
 
<pre>
{{CarolKyneaBase
+
{{Carol-Kynea prime
 
|CKBase=
 
|CKBase=
 
|CKMaxn=
 
|CKMaxn=
Line 21: Line 29:
 
==Example==
 
==Example==
 
<pre>
 
<pre>
{{CarolKyneaBase
+
{{Carol-Kynea prime
 
|CKBase=2
 
|CKBase=2
 
|CKMaxn=1234
 
|CKMaxn=1234
 
|CKDate=2019-01-01
 
|CKDate=2019-01-01
|CKReserved=Karbon
+
|CKReserved=Karsten Bonath
|CKClist=1, 2, 3, 4
+
|CKClist=
|CKKlist=5, 6, 7
+
1;234;C:text
 +
2;564
 +
4
 +
|CKKlist=
 +
5;C:Another text
 +
6;C:see [[Examples]]
 +
7
 
|CKRemarks=None
 
|CKRemarks=None
 
|CKSieve=y
 
|CKSieve=y
Line 33: Line 47:
 
</pre>
 
</pre>
 
will create:
 
will create:
{{CarolKyneaBase
+
{{Carol-Kynea prime
 
|CKBase=2
 
|CKBase=2
 
|CKMaxn=1234
 
|CKMaxn=1234
 
|CKDate=2019-01-01
 
|CKDate=2019-01-01
|CKReserved=Karbon
+
|CKReserved=Karsten Bonath
|CKClist=1, 2, 3, 4
+
|CKClist=
|CKKlist=5, 6, 7
+
1;234;C:text
 +
2;564
 +
4
 +
|CKKlist=
 +
5;C:Another text
 +
6;C:see [[Examples]]
 +
7
 
|CKRemarks=None
 
|CKRemarks=None
 
|CKSieve=y
 
|CKSieve=y
 
}}
 
}}
[[Category:Templates]]
 
 
 
==Template-data==
 
==Template-data==
 
<templatedata>
 
<templatedata>
Line 71: Line 89:
 
},
 
},
 
"CKClist": {
 
"CKClist": {
"type": "string",
+
"type": "content",
 
"label": "List C-primes",
 
"label": "List C-primes",
 
"description": "List of prime ''n''-values on Carol-side"
 
"description": "List of prime ''n''-values on Carol-side"
Line 91: Line 109:
 
}
 
}
 
},
 
},
"description": "Current data for Caol/Kynea base <b>"
+
"description": "Current data for Carol/Kynea base <b>",
 +
"format": "block"
 
}
 
}
 
</templatedata>
 
</templatedata>
</noinclude><includeonly>
+
[[Category:Prime collections]]</noinclude><includeonly>__NOTOC__{{#ifeq:{{NAMESPACENUMBER}}|0|<!--
 +
-->{{#vardefine:b|{{#explode:{{PAGENAME}}||-1}}}}{{DISPLAYTITLE:Carol primes ({{#var:b}}<sup>n</sup>-1)<sup>2</sup>-2 and Kynea primes ({{#var:b}}<sup>n</sup>+1)<sup>2</sup>-2}}<!--
 +
-->{{#if:{{{CKClist|}}}||[[Category:Carol-Kynea without Carol‎|#.....{{padleft:{{#var:b}}|5}}]]}}<!--
 +
-->{{#if:{{{CKKlist|}}}||[[Category:Carol-Kynea without Kynea|#.....{{padleft:{{#var:b}}|5}}]]}}<!--
 +
-->{{#if:{{{CKClist|}}}||{{#if:{{{CKKlist|}}}||[[Category:Carol-Kynea without both|#.....{{padleft:{{#var:b}}|5}}]]}}}}<!--
 +
-->{{#if:{{#pos:{{{CKRemarks|}}}|Power}}|[[Category:Carol-Kynea power-of|#.....{{padleft:{{#var:b}}|5}}]]}}<!--
 +
-->[[Category:Carol-Kynea prime|#.....{{padleft:{{#var:b}}|5}}]]{{#if:{{{CKReserved|}}}|{{Reserved|{{{CKReserved}}}}}}}}}
 
==Current data==
 
==Current data==
{| style="border:solid black 1px"
+
{| class="primedata"
| <div width="15%" style="background-color:#ddd">
+
| class="primetemplate color-PrimeTemplate" |
 
  {|  
 
  {|  
   | <b>Base :</b> || {{{CKBase}}} {{#if:{{{CKSieve|}}}|&nbsp;([[:File:{{PAGENAME}} sieve.zip|sieve]])|}}
+
   | align="right" | <b>Base :</b> || {{{CKBase}}} {{#if:{{{CKSieve|}}}|&nbsp;([[:File:{{PAGENAME}} sieve.zip|sieve]])|}}
 
   |-
 
   |-
   | <b>Max&nbsp;<i>n</i> :</b> || {{{CKMaxn}}}
+
   | align="right" | <b>Max&nbsp;<i>n</i> :</b> || {{Num|{{{CKMaxn}}}}}
 
   |-
 
   |-
   | <b>Date :</b> || {{{CKDate}}}
+
   | align="right" | <b>Date :</b> || {{{CKDate}}}
 
   |-
 
   |-
 
   {{#if:{{{CKReserved|}}}|
 
   {{#if:{{{CKReserved|}}}|
     {{!}} <b>Reserved :</b> {{!}}{{!}} [[:User:{{{CKReserved}}}|{{{CKReserved}}}]]
+
     {{!}} align="right" {{!}} <b>Reserved :</b> {{!}}{{!}} [[{{{CKReserved}}}]]{{#ifeq:{{NAMESPACENUMBER}}|0|<span style="display:none">[[{{{CKReserved}}}/Reserved]]</span>}}
 
   }}
 
   }}
 
  |}
 
  |}
</div>
+
|
| <div width="85%">
 
 
  {|  
 
  {|  
  | <b>C {{padleft:{{#if:{{{CKClist|}}}|{{#arraydefine:CC|{{{CKClist}}}}}{{#arraysize:CC}}|0}}|2}} : </b> {{{CKClist}}}
+
  | <b>Carol: ({{padleft:{{#if:{{{CKClist|}}}|{{#if:{{#pos:{{{CKRemarks|}}}|Power}}|{{#arraydefine:CL|{{{CKClist}}}}}{{#arraysize:CL}}|{{NVal list|{{{CKClist}}}|count}}|0}}}}|2}})</b> {{NVal list|{{{CKClist}}}}}
 
  |-
 
  |-
 
  | <hr>
 
  | <hr>
 
  |-
 
  |-
  | <b>K {{padleft:{{#if:{{{CKKlist|}}}|{{#arraydefine:CK|{{{CKKlist}}}}}{{#arraysize:CK}}|0}}|2}} : </b> {{{CKKlist}}}
+
  | <b>Kynea: ({{padleft:{{#if:{{{CKKlist|}}}|{{#if:{{#pos:{{{CKRemarks|}}}|Power}}|{{#arraydefine:CK|{{{CKKlist}}}}}{{#arraysize:CK}}|{{NVal list|{{{CKKlist}}}|count}}|0}}}}|2}})</b> {{NVal list|{{{CKKlist}}}}}
 
  |}
 
  |}
</div>
+
|}{{#if:{{{CKRemarks|}}}|
|}
 
{{#if:{{{CKRemarks|}}}|
 
 
{{{!}}  
 
{{{!}}  
{{!}} <div height="120%" style="background-color:#ddd;"><b>Remarks : </b></div> {{!}}{{!}} {{{CKRemarks}}}
+
{{!}} <div height="120%" class="color-PrimeTemplate"><b>Remarks : </b></div> {{!}}{{!}} {{{CKRemarks}}}
 
{{!}}}
 
{{!}}}
}}<!--
+
}}
-->{{#if:{{{CKClist|}}}||[[Category:Carol-Kynea without Carol‎]]}}<!--
+
{{#ifexpr:{{#if:{{#pos:{{{CKClist}}}|:}}|1|0}} + {{#if:{{#pos:{{{CKKlist}}}|:}}|1|0}} > 0|
-->{{#if:{{{CKKlist|}}}||[[Category:Carol-Kynea without Kynea]]}}<!--
+
==Notes==
-->{{#if:{{{CKClist|}}}||{{#if:{{{CKKlist|}}}||[[Category:Carol-Kynea without both]]}}}}</includeonly>
+
<references />}}</includeonly>

Latest revision as of 01:58, 17 May 2021

Description

Template Carol-Kynea prime

Display of current data for Carol/Kynea-type base.

Notes:

The page title is displayed with the formula.
The category Carol-Kynea prime is set.
If no Carol primes are given, the page is categorized into Carol-Kynea without Carol‎.
If no Kynea primes are given, the page is categorized into Carol-Kynea without Kynea.
If no primes are given at all, the page is categorized into Carol-Kynea without both.
If <CKRemarks> contains "Power" the page is categorized into Carol-Kynea power-of.

Prototype

{{Carol-Kynea prime
|CKBase=
|CKMaxn=
|CKDate=
|CKReserved=
|CKClist=
|CKKlist=
|CKRemarks=
|CKSieve=
}}

Example

{{Carol-Kynea prime
|CKBase=2
|CKMaxn=1234
|CKDate=2019-01-01
|CKReserved=Karsten Bonath
|CKClist=
1;234;C:text
2;564
4
|CKKlist=
5;C:Another text
6;C:see [[Examples]]
7
|CKRemarks=None
|CKSieve=y
}}

will create:

Current data

Base : 2  (sieve)
Max n : 1,234
Date : 2019-01-01
Reserved : Karsten Bonath
Carol: (03) 1[1], 2, 4

Kynea: (03) 5[2], 6[3], 7
Remarks :
None

Notes

  1. text
  2. Another text
  3. see Examples

Template-data

<templatedata> { "params": { "CKBase": { "type": "string", "required": true, "label": "Base b", "description": "Base for this type" }, "CKMaxn": { "type": "string", "label": "Max n", "description": "Maximal searched n-value" }, "CKDate": { "type": "string", "label": "Date", "description": "Date of last edit" }, "CKReserved": { "type": "string", "label": "Reserved by", "description": "Reserved by contributor, if given" }, "CKClist": { "type": "content", "label": "List C-primes", "description": "List of prime n-values on Carol-side" }, "CKKlist": { "type": "string", "label": "List K-primes", "description": "List of prime n-values on Kynea-side" }, "CKRemarks": { "type": "string", "label": "Remarks", "description": "Remarks for this base" }, "CKSieve": { "type": "string", "label": "Sieve available", "description": "If a sieve file is available, the link is generated" } }, "description": "Current data for Carol/Kynea base ", "format": "block" } </templatedata>