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:Williams prime"

From Prime-Wiki
Jump to: navigation, search
m
m
(15 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
Display of current data for Williams primes, comments will be displayed as references at the bottom.
 
Display of current data for Williams primes, comments will be displayed as references at the bottom.
  
==Calling==
+
The category [[:Category:Williams prime|Williams prime]] is set by default.
 +
 
 +
==Prototype==
 
<pre>
 
<pre>
 
{{Williams prime
 
{{Williams prime
Line 14: Line 16:
 
|WiNlist=
 
|WiNlist=
 
|WiRemarks=
 
|WiRemarks=
 +
|WiSieve
 
}}
 
}}
 
</pre>
 
</pre>
 
The category [[:Category:Williams prime|Williams prime]] is set by default.
 
  
 
==Example==
 
==Example==
Line 25: Line 26:
 
|WiMaxn=1000000
 
|WiMaxn=1000000
 
|WiDate=2016
 
|WiDate=2016
|WiReserved=No
+
|WiReserved=Karsten Bonath
 
|WiNlist=
 
|WiNlist=
 
1
 
1
Line 35: Line 36:
 
93
 
93
 
|WiRemarks=These primes are [[Near-repdigit]] numbers; {{OEIS|l|A056725}}
 
|WiRemarks=These primes are [[Near-repdigit]] numbers; {{OEIS|l|A056725}}
 +
|WiSieve=
 
}}
 
}}
 
</pre>
 
</pre>
Line 42: Line 44:
 
|WiMaxn=1000000
 
|WiMaxn=1000000
 
|WiDate=2016
 
|WiDate=2016
|WiReserved=Unknown
+
|WiReserved=Karsten Bonath
 
|WiNlist=
 
|WiNlist=
 
1
 
1
Line 52: Line 54:
 
93
 
93
 
|WiRemarks=These primes are [[Near-repdigit number]]s (8999...999); {{OEIS|l|A056725}}
 
|WiRemarks=These primes are [[Near-repdigit number]]s (8999...999); {{OEIS|l|A056725}}
 +
|WiSieve=
 
}}
 
}}
[[Category:Prime collections]]
+
[[Category:Prime collections]]</noinclude><includeonly>__NOTOC__{{#ifeq:{{NAMESPACENUMBER}}|0|<!--
</noinclude><includeonly>{{#ifeq:{{NAMESPACENUMBER}}|0|{{#vardefine:ti|{{#explode:{{PAGENAME}}||-1}}}}{{DISPLAYTITLE:Williams primes of the form: {{Kbn|({{#var:ti}}-1)|{{#var:ti}}|n}}}}[[Category:Williams prime|#.....{{padleft:{{#var:ti}}|5}}]]}}
+
-->{{#vardefine:base|{{#explode:{{PAGENAME}}||-1}}}}<!--
 +
-->{{#vardefine:type|{{#explode:{{PAGENAME}}||-2}}}}<!--
 +
-->{{#vardefine:t1|{{#switch:{{#sub:{{#var:type}}|0|1}}|M=-|P=+}}}}<!--
 +
-->{{#vardefine:t2|{{#switch:{{#sub:{{#var:type}}|1|1}}|M=-|P=+}}}}<!--
 +
-->{{#ifeq:{{#var:t2}}|+|<!--
 +
-->{{DISPLAYTITLE:Williams primes of the form {{Kbn|+|{{#expr:{{#var:base}}{{#var:t1}}1}}|{{#var:base}}|n}}}}|<!--
 +
-->{{DISPLAYTITLE:Williams primes of the form {{Kbn|{{#expr:{{#var:base}}{{#var:t1}}1}}|{{#var:base}}|n}}}}}}<!--
 +
-->{{#if:{{{WiNlist|}}}||[[Category:Williams prime {{#var:type}} without|#.....{{padleft:{{#var:base}}|5}}]]}}<!--
 +
-->[[Category:Williams prime {{#var:type}}|#.....{{padleft:{{#var:base}}|5}}]]{{#if:{{{WiReserved|}}}|{{Reserved|{{{WiReserved}}}}}}}}}
 
==Current data==
 
==Current data==
{| style="border:solid black 1px"
+
{| class="primedata"
| <div width="15%" style="background-color:#ddd">
+
| class="primetemplate" |
 
  {|  
 
  {|  
   | <b>Base :</b> || {{{WiBase}}}
+
   | align="right" | <b>Base :</b> || {{{WiBase}}} {{#if:{{{WiSieve|}}}|{{#ifexist:File:{{PAGENAME}} sieve.zip|&nbsp;([[:File:{{PAGENAME}} sieve.zip|sieve]])|[[File:{{PAGENAME}} sieve.zip|Upload me!]]}}}}
 
   |-
 
   |-
   | <b>Count :</b> || {{NVal list|{{{WiNlist}}}|count}}
+
   | align="right" | <b>Count :</b> || {{#if:{{#pos:{{{WiRemarks|}}}|reuse}}|{{#arraydefine:L|{{{WiNlist}}}}}{{#arraysize:L}}|{{NVal list|{{{WiNlist}}}|count}}}}
 
   |-
 
   |-
   | <b>Max&nbsp;<i>n</i> :</b> || {{Num|{{{WiMaxn}}}}}
+
   | align="right" | <b>Max&nbsp;<i>n</i> :</b> || {{Num|{{{WiMaxn}}}}}
 
   |-
 
   |-
   | <b>Date :</b> || {{{WiDate}}}
+
   | align="right" | <b>Date :</b> || {{{WiDate}}}
 
   |-
 
   |-
 
   {{#if:{{{WiReserved|}}}|
 
   {{#if:{{{WiReserved|}}}|
     {{!}} <b>Reserved :</b> {{!}}{{!}} [[:User:{{{WiReserved}}}|{{{WiReserved}}}]]
+
     {{!}} align="right" {{!}} <b>Reserved :</b> {{!}}{{!}} {{Contribs|{{{WiReserved}}}}}{{#ifeq:{{NAMESPACENUMBER}}|0|<span style="display:none">[[{{{WiReserved}}}/Reserved]]</span>}}
 
   }}
 
   }}
 
  |}
 
  |}
</div>
+
|
| <div width="85%">
 
 
  {|  
 
  {|  
 
  | {{NVal list|{{{WiNlist}}}}}
 
  | {{NVal list|{{{WiNlist}}}}}
 
  |}
 
  |}
</div>
+
|}{{#if:{{{WiRemarks|}}}|
|}
 
{{#if:{{{WiRemarks|}}}|
 
 
{{{!}}  
 
{{{!}}  
{{!}} <div height="120%" style="background-color:#ddd;"><b>Remarks : </b></div> {{!}}{{!}} {{{WiRemarks}}}
+
{{!}} <div height="120%" style="background-color:SkyBlue;"><b>Remarks : </b></div> {{!}}{{!}} {{{WiRemarks}}}
 
{{!}}}
 
{{!}}}
 
}}
 
}}

Revision as of 09:32, 19 June 2020

Description

Template Williams prime

Display of current data for Williams primes, comments will be displayed as references at the bottom.

The category Williams prime is set by default.

Prototype

{{Williams prime
|WiBase=
|WiMaxn=
|WiDate=
|WiReserved=
|WiNlist=
|WiRemarks=
|WiSieve
}}

Example

{{Williams prime
|WiBase=10
|WiMaxn=1000000
|WiDate=2016
|WiReserved=Karsten Bonath
|WiNlist=
1
3
7
19
29
37
93
|WiRemarks=These primes are [[Near-repdigit]] numbers; {{OEIS|l|A056725}}
|WiSieve=
}}

will create:

Current data

Base : 10
Count : 7
Max n : 1,000,000
Date : 2016
Reserved : Karsten Bonath
1, 3, 7, 19, 29, 37, 93
Remarks :
These primes are Near-repdigit numbers (8999...999); sequence A056725 in OEIS