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”).
%I #37 Jul 23 2021 10:14:04
%S 2,4,8,14,38,98,344,22268,79808,187124,347978,2171618,4219797674,
%T 98059918334,22518029924768,54420534706118,252534792143648
%N a(1) = 2; for n>1, a(n) = smallest integer > a(n-1) such that a(n) + a(i) + 1 is prime for all 1 <= i <= n-1.
%C a(i) == 2 mod 6 for i > 2. - _Walter Kehowski_, Jun 03 2006
%C a(i) == either 8 or 14 (mod 30) for i > 2. - _Robert G. Wilson v_, Oct 16 2012
%C The Hardy-Littlewood k-tuple conjecture would imply that this sequence is infinite. Note that, for n > 2, a(n)+3 and a(n)+5 are both primes, so a proof that this sequence is infinite would also show that there are infinitely many twin primes. - _N. J. A. Sloane_, Apr 21 2007
%C No more terms less than 7*10^12. - _David Wasserman_, Apr 03 2007
%H G. H. Hardy and J. E. Littlewood, <a href="https://doi.org/10.1007/BF02403921">Some problems of 'Partitio numerorum'; III: On the expression of a number as a sum of primes</a>, Acta Math., Vol. 44, No. 1 (1923), pp. 1-70.
%H Carlos Rivera, <a href="http://primepuzzles.net/puzzles/puzz_037.htm">Puzzle 37. Set of even numbers { ai } such that every ai + aj + 1 is prime ( i & j are different )</a>, The Prime Puzzles and Problems Connection.
%e a(5) = 38 because 38+2+1, 38+4+1, 38+8+1 and 38+14+1 are all prime.
%p EP:=[2,4]: P:=[]: for w to 1 do for n from 1 to 800*10^6 do s:=6*n+2; Q:=map(z-> z+s+1); if andmap(isprime,Q) then EP:=[op(EP),s]; P:=[op(P),op(Q)] fi; od od; EP; P: # _Walter Kehowski_, Jun 03 2006
%t f[1] = 2; f[2] = 4; f[3] = 8; f[n_] := f[n] = Block[{lst = Array[f, n - 1], k = f[n - 1] + 7}, While[ Union[ PrimeQ[k + lst]] != {True}, k += 6]; k-1]; Array[f, 13] (* _Robert G. Wilson v_, Oct 16 2012 *)
%o (Haskell)
%o a093483 n = a093483_list !! (n-1)
%o a093483_list = f ([2..7] ++ [8,14..]) [] where
%o f (x:xs) ys = if all (== 1) $ map (a010051 . (+ x)) ys
%o then x : f xs ((x+1):ys) else f xs ys
%o -- _Reinhard Zumkeller_, Dec 11 2011
%Y Cf. A034881, A117480, A121404, A103828.
%Y Cf. A010051.
%K hard,nonn,nice
%O 1,1
%A _Amarnath Murthy_, Apr 14 2004
%E a(7) from _Jonathan Vos Post_, Mar 22 2006
%E More terms from _Joshua Zucker_, Jul 24 2006
%E Edited and extended to a(14) by _David Wasserman_, Apr 03 2007
%E a(15)-a(17) from _Don Reble_, added by _N. J. A. Sloane_, Sep 18 2012