login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A245601
Smallest prime Q such that prime(n)*(2*Q)^prime(n)+1 is prime.
2
3, 2, 7, 2, 181, 503, 43, 281, 919, 397, 2099, 389, 163, 89, 5641, 751, 1951, 353, 2, 3709, 4673, 1607, 769, 7699, 107, 7069, 17, 13147, 7841, 97, 5741, 2383, 5557, 251, 9661, 14969, 269, 2753, 18451, 2797, 4729, 29, 15649, 5387, 8539, 13001, 1481, 2
OFFSET
1,1
LINKS
Pierre CAMI and Jens Kruse Andersen, Table of n, a(n) for n = 1..200 (first 100 terms from Pierre CAMI)
EXAMPLE
2*(2*2)^2 + 1 = 33 composite.
2*(2*3)^2 + 1 = 73 prime so a(1) = 3.
MATHEMATICA
a245601[n_Integer] := Catch[
Do[
If[And[PrimeQ[Q], PrimeQ[Prime[n]*(2*Q)^Prime[n] + 1]] == True,
Throw[Q]],
{Q, 1000000}]
]; Map[a245601, Range[50]] (* Michael De Vlieger, Aug 03 2014 *)
PROG
(PFGW & SCRIPT)
SCRIPT
DIM i, 0
DIM n
DIMS t
OPENFILEOUT myf, b(n).txt
LABEL loop1
SET i, i+1
IF i>100 THEN END
SET n, 0
LABEL loop2
SET n, n+1
SETS t, %d, %d\,; p(i); p(n)
PRP p(i)*(2*p(n))^p(i)+1, t
IF ISPRP THEN GOTO a
GOTO loop2
LABEL a
WRITE myf, t
GOTO loop1
(PARI) a(n)=for(k=1, 10^5, if(ispseudoprime(prime(n)*(2*prime(k))^prime(n)+1), return(prime(k))))
n=1; while(n<100, print1(a(n), ", "); n++) \\ Derek Orr, Jul 27 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Jul 27 2014
STATUS
approved