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:GP"

From Prime-Wiki
Jump to: navigation, search
(contributor for MultiRes returned)
 
(8 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
==Call==
 
==Call==
 
:<nowiki>{{GP|<prime name>|<Parameter>}}</nowiki>
 
:<nowiki>{{GP|<prime name>|<Parameter>}}</nowiki>
 +
 +
Note:
 +
:For Riesel and Proth primes parameters for reservations the returned value is as follows:
 +
:- Parameter (P/R)Reserved questioned:
 +
::- (P/R)Reserved is filled &rarr; contributor is given
 +
::- (P/R)MultiRes is filled &rarr; contributor is given
 +
 +
:- Parameter (P/R)MultiRes questioned:
 +
::- (P/R)MultiRes is filled &rarr; the number of the [[:Category:Multi_Reservation|MultiReservation]] is given
  
 
==Examples==
 
==Examples==
Get the parameter "CKReserved" from "Carol-Kynea base 2" primes
+
Get the parameter "CKBase" from "Carol-Kynea base 2" primes
 
*<nowiki>{{GP|Carol-Kynea prime 2|CKBase}}</nowiki> results in
 
*<nowiki>{{GP|Carol-Kynea prime 2|CKBase}}</nowiki> results in
 
:{{GP|Carol-Kynea prime 2|CKBase}}
 
:{{GP|Carol-Kynea prime 2|CKBase}}
  
*<nowiki>{{GP|Riesel prime 15|RMaxn}}</nowiki> results in
+
*<nowiki>{{GP|Riesel prime 2 15|RMaxn}}</nowiki> results in
:{{GP|Riesel prime 15|RMaxn}}
+
:{{GP|Riesel prime 2 15|RMaxn}}
 +
 
 +
*<nowiki>{{GP|Riesel prime 2 65|RMaxn}}</nowiki> (using MultiReservation) results in
 +
:{{GP|Riesel prime 2 65|RMaxn}}
 +
 
 +
*<nowiki>{{GP|Riesel prime 2 65|RDate}}</nowiki> (using MultiReservation) results in
 +
:{{GP|Riesel prime 2 65|RDate}}
  
*<nowiki>{{GP|Riesel prime 65|RMaxn}}</nowiki> (using MultiReservation) results in
+
*<nowiki>{{GP|Riesel prime 2 65|RNlist}}</nowiki>
:{{GP|Riesel prime 65|RMaxn}}
+
{{GP|Riesel prime 2 65|RNlist}}
  
*<nowiki>{{GP|Riesel prime 65|RDate}}</nowiki> (using MultiReservation) results in
+
*<nowiki>{{GP|GF Divisor 3 209|GFList}}</nowiki>
:{{GP|Riesel prime 65|RDate}}
+
{{GP|GF Divisor 3 209|GFList}}
[[Category:Templates]]
+
[[Category:Templates]]</noinclude><includeonly><!--
</noinclude><includeonly>{{#if:{{#pos:{{{1}}}|Williams}}|{{#vardefine:q|Williams prime}}|{{#vardefine:q|{{#sub:{{{1}}}|0|{{#rpos:{{{1}}}| }}}}}}}}<!--
+
-->{{#vardefine:_type|none}}<!--
-->{{#vardefine:m|{{#dpl:title={{{1}}}|skipthispage=no|include={ {{#var:q}}}:{{#sub:{{{1}}}|0|1}}MultiRes}}}}<!--
+
-->{{#vardefine:_short|none}}<!--
-->{{#ifexist:{{{1}}}|{{#dpl:title={{{1}}}|skipthispage=no|include={ {{#var:q}}}:{{{2}}}}}}}<!--
+
-->{{#if:{{#pos:{{{1}}}|Carol}}|{{#vardefine:_type|Carol-Kynea prime}}{{#vardefine:_short|CK}}}}<!--
-->{{#if:{{#var:m}}|
+
-->{{#if:{{#pos:{{{1}}}|Cullen}}|{{#vardefine:_type|Cullen prime}}{{#vardefine:_short|Cu}}}}<!--
 +
-->{{#if:{{#pos:{{{1}}}|Leyland}}|{{#vardefine:_type|Leyland prime}}{{#vardefine:_short|Le}}}}<!--
 +
-->{{#if:{{#pos:{{{1}}}|Proth}}|{{#vardefine:_type|Proth prime}}{{#vardefine:_short|P}}}}<!--
 +
-->{{#if:{{#pos:{{{1}}}|Riesel}}|{{#vardefine:_type|Riesel prime}}{{#vardefine:_short|R}}}}<!--
 +
-->{{#if:{{#pos:{{{1}}}|Williams}}|{{#vardefine:_type|Williams prime}}{{#vardefine:_short|Wi}}}}<!--
 +
-->{{#if:{{#pos:{{{1}}}|Woodall}}|{{#vardefine:_type|Woodall prime}}{{#vardefine:_short|Wo}}}}<!--
 +
-->{{#if:{{#pos:{{{1}}}|GF}}|{{#vardefine:_type|GF Divisor}}{{#vardefine:_short|GF}}}}<!--
 +
-->{{#if:{{#pos:{{{1}}}|Generalized Fermat number}}|{{#vardefine:_type|Generalized Fermat number}}{{#vardefine:_short|GF}}}}<!--
 +
-->{{#vardefine:_mres|{{#ifexist:{{{1}}}|{{#dpl:title={{{1}}}|skipthispage=no|include={ {{#var:_type}}}:{{#var:_short}}MultiRes}}}}}}<!--
 +
-->{{#vardefine:_mmax|{{#ifexist:{{{1}}}|{{#dpl:title={{{1}}}|skipthispage=no|include={ {{#var:_type}}}:{{#var:_short}}Maxn}}}}}}<!--
 +
-->{{#ifexist:{{{1}}}|{{#if:{{#var:_mres}}|
 
   {{#switch:{{{2}}}
 
   {{#switch:{{{2}}}
   |RMaxn |PMaxn={{Multi Reservation:{{#var:m}}-NMax}}
+
   |RMaxn |PMaxn={{#ifeq:{{#var:_mmax}}||{{Multi Reservation:{{#var:_mres}}-NMax}}|{{#var:_mmax}}}}
   |RDate |PDate={{Multi Reservation:{{#var:m}}-Date}}
+
  |RReserved |PReserved={{Multi Reservation:{{#var:_mres}}-Contributor}}
 +
   |RDate |PDate={{Multi Reservation:{{#var:_mres}}-Date}}
 +
  |#default={{#dpl:title={{{1}}}|skipthispage=no|include={ {{#var:_type}}}:{{{2}}}}}
 
   }}
 
   }}
 +
  |{{#ifeq:{{{2}}}|Date|{{#dpl:title={{{1}}}|skipthispage=no|include={ {{#var:_type}}}:{{#var:_short}}{{{2}}}}}|{{#dpl:title={{{1}}}|skipthispage=no|include={ {{#var:_type}}}:{{{2}}}}}}}}}
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 12:41, 5 September 2024

Description

Get a parameter value of a template by name if exists, "" (null) otherwise.

Call

{{GP|<prime name>|<Parameter>}}

Note:

For Riesel and Proth primes parameters for reservations the returned value is as follows:
- Parameter (P/R)Reserved questioned:
- (P/R)Reserved is filled → contributor is given
- (P/R)MultiRes is filled → contributor is given
- Parameter (P/R)MultiRes questioned:
- (P/R)MultiRes is filled → the number of the MultiReservation is given

Examples

Get the parameter "CKBase" from "Carol-Kynea base 2" primes

  • {{GP|Carol-Kynea prime 2|CKBase}} results in
2
  • {{GP|Riesel prime 2 15|RMaxn}} results in
7000000
  • {{GP|Riesel prime 2 65|RMaxn}} (using MultiReservation) results in
3100000
  • {{GP|Riesel prime 2 65|RDate}} (using MultiReservation) results in
2020-11-12
  • {{GP|Riesel prime 2 65|RNlist}}

4 6;C:Williams 65•641-1 12;C:Williams 65•642-1 22 28 52 78;C:Williams 65•6413-1 94 124 162;C:Williams 65•6427-1 174;C:Williams 65•6429-1 192;C:Williams 65•6432-1 204;C:Williams 65•6434-1 304 376 808 930;C:Williams 65•64155-1 972;C:Williams 65•64162-1 1714 1776;C:Williams 65•64296-1 2176 2568;C:Williams 65•64428-1 4392;C:Williams 65•64732-1 4728;C:Williams 65•64788-1 5548 8046;C:Williams 65•641341-1 12474;C:Williams 65•642079-1 26856;C:Williams 65•644476-1 27156;C:Williams 65•644526-1 45240;C:Williams 65•647540-1 52026;C:Williams 65•648671-1 134598;1957;C:Williams 65•6422433-1 179658;656;C:Williams 65•6429943-1 185946;626;C:Williams 65•6430991-1 578512;75621 647130;78230;C:Williams 65•64107855-1 1374574;97849 1421088;98403;C:Williams 65•64236848-1 1505640;99143;C:Williams 65•64250940-1 2450614;117055 2583720;120527;C:Williams 65•64430620-1 2876718;122668;C:Williams 65•64479453-1 3080952;131397;C:Williams 65•64513492-1

  • {{GP|GF Divisor 3 209|GFList}}

2,1,207#1956#Raphael M. Robinson 3,1,207#1992#Harvey Dubner 3,2,206#1996#Anders Björn,Hans Riesel 4,3,207#1996#Anders Björn,Hans Riesel 5,1,208#1992#Harvey Dubner 5,2,208#1996#Anders Björn,Hans Riesel 5,3,208#1996#Anders Björn,Hans Riesel 5,4,208#1996#Anders Björn,Hans Riesel 6,1,203#1969#Hans Riesel 6,5,208#1996#Anders Björn,Hans Riesel 8,3,205#1996#Anders Björn,Hans Riesel 8,5,208#1996#Anders Björn,Hans Riesel 9,2,207#1996#Anders Björn,Hans Riesel 9,5,208#1996#Anders Björn,Hans Riesel 9,8,207#1996#Anders Björn,Hans Riesel 10,1,208#1992#Harvey Dubner 10,3,208#1996#Anders Björn,Hans Riesel 10,9,208#1996#Anders Björn,Hans Riesel 12,1,207#1969#Hans Riesel 12,5,208#1996#Anders Björn,Hans Riesel