login
A252733
Smallest number k such that (k^2)*2^(2*n+1)-1 is a prime number.
2
2, 1, 1, 1, 4, 2, 1, 2, 1, 1, 3, 5, 8, 4, 2, 1, 7, 5, 10, 5, 6, 3, 19, 71, 46, 23, 14, 7, 4, 2, 1, 3, 15, 13, 38, 19, 10, 5, 28, 14, 7, 8, 4, 2, 1, 11, 14, 7, 6, 3, 8, 4, 2, 1, 3, 54, 27, 17, 11, 16, 8, 4, 2, 1, 38, 19, 52, 26, 13, 15, 11
OFFSET
0,1
COMMENTS
If k=1 then 2*n+1 is a Mersenne exponent.
EXAMPLE
2*2^1-1=3 prime so a(0)=2.
1*2^3-1=7 prime so a(1)=1.
1*2^5-1=31 prime so a(2)=1.
MATHEMATICA
Table[k=1; While[Not[PrimeQ[k^2*2^(2*n+1)-1]], k++]; k, {n, 0, 100}] (* Vaclav Kotesovec, Dec 21 2014 *)
PROG
(PFGW & SCRIPT)
SCRIPT
DIM n, 0
DIM k
OPENFILEOUT myf, a(n).txt
LABEL loop1
SET n, n+1
SET k, 0
LABEL loop2
SET k, k+1
PRP k^2*2^(2*n+1)-1
IF ISPRP THEN GOTO a
GOTO loop2
LABEL a
WRITE myf, k
GOTO loop1
CROSSREFS
Sequence in context: A297404 A235388 A294897 * A181876 A131505 A100092
KEYWORD
nonn
AUTHOR
Pierre CAMI, Dec 21 2014
STATUS
approved