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”).

A119752
a(1)=2; a(n)=first even number greater than a(n-1) such that a(i)+a(n)+1 is prime for all i=1,2,...,n.
9
2, 8, 14, 44, 224, 638, 1274, 4004, 675404, 2203958, 3075158, 6195234164, 77989711184, 4566262987328
OFFSET
1,1
MAPLE
R:= [2]: count:= 1:
for k from 4 by 2 while count < 11 do
if isprime(2*k+1) and andmap(isprime, [seq(R[i]+k+1, i=1..count)]) then
R:= [op(R), k]; count:= count+1
fi
od:
R; # Robert Israel, Mar 06 2023
MATHEMATICA
Table[If[n == 1, a[1] = 2, j = a[n - 1] + 2; While[a[n] = j; !
AllTrue[Table[a[i] + a[n] + 1, {i, 1, n}], PrimeQ], j += 2]; j]
, {n, 1, 9}] (* Robert Price, Apr 03 2019 *)
PROG
(PARI) isok(va, k, n) = if (isprime(2*k+1), for (i=1, n-1, if (! isprime(va[i]+k+1), return(0))); return(1));
lista(nn) = my(va=vector(nn)); va[1]=2; for (n=2, nn, my(k=va[n-1]+2); while (!isok(va, k, n), k+=2); va[n] = k); va; \\ Michel Marcus, Mar 06 2023
CROSSREFS
Cf. A119751.
Sequence in context: A039660 A333053 A333054 * A111001 A055258 A277649
KEYWORD
nonn,more,hard
AUTHOR
Walter Kehowski, Jun 17 2006
EXTENSIONS
a(13)-a(14) from Donovan Johnson, Mar 23 2008
STATUS
approved