login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A240166 Smallest prime number P such that 2*P^(2*n)-1 is a prime number. 1
2, 2, 2, 3, 13, 2, 7, 2, 2, 3, 79, 5, 83, 1427, 2, 83, 47, 7, 31, 139, 23, 53, 7, 373, 193, 71, 5, 3, 463, 2, 3, 13, 281, 3, 281, 59, 17, 13, 1399, 7, 61, 163, 151, 2, 103, 479, 89, 5, 127, 421, 457, 857, 2, 43, 101, 349, 359, 2243, 13, 13, 17, 1451, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(n) = 2 when 2*n + 1 is a prime Mersenne exponent (A000043).
LINKS
EXAMPLE
2*2^(2*1) - 1 = 7 prime so a(1) = 2.
2*2^(2*2) - 1 = 31 prime so a(2) = 2.
2*2^(2*3) - 1 = 127 prime so a(3) = 2.
MAPLE
A:= proc(n)
local p;
p:= 2;
while not isprime(2*p^(2*n)-1) do p:= nextprime(p) od:
p;
end proc:
seq(A(n), n=1..100); # Robert Israel, Sep 14 2014
MATHEMATICA
a240166[n_Integer] := Module[{p = 1},
While[! PrimeQ[2*Prime[p]^(2*n) - 1], p++]; Prime[p]]; a240166 /@ Range[120] (* Michael De Vlieger, Aug 12 2014 *)
PROG
(PFGW & SCRIPT)
SCRIPT
DIM i
DIM n, 0
DIM k
DIMS t
OPENFILEOUT myf, a(n).txt
LABEL loop1
SET n, n+1
SET i, 0
LABEL loop2
SET i, i+1
SETS t, %d, %d\ ; n; p(i)
PRP 2*p(i)^(2*n)-1, t
IF ISPRP THEN GOTO a
GOTO loop2
LABEL a
WRITE myf, t
GOTO loop1
(PARI) a(n) = p=2; while(!ispseudoprime(2*p^(2*n)-1), p=nextprime(p+1)); p
vector(70, n, a(n)) \\ Colin Barker, Aug 02 2014
CROSSREFS
Cf. A000043.
Sequence in context: A238188 A360693 A051007 * A346801 A326375 A358318
KEYWORD
nonn
AUTHOR
Pierre CAMI, Aug 02 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 7 10:32 EDT 2024. Contains 375730 sequences. (Running on oeis4.)