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

Index of the first occurrence of n in A092953. There are a(n) primes p < n such that n+p is a prime.
2

%I #10 Jul 15 2018 13:04:20

%S 1,3,8,12,26,40,24,48,42,54,110,60,140,84,160,90,132,126,162,120,168,

%T 216,204,222,246,180,264,252,240,210,366,342,270,396,300,414,336,516,

%U 850,558,330,462,534,552,390,504,450,1040,540,588,420,594,708,510,876

%N Index of the first occurrence of n in A092953. There are a(n) primes p < n such that n+p is a prime.

%H Reinhard Zumkeller, <a href="/A092954/b092954.txt">Table of n, a(n) for n = 0..1000</a>

%e a(6) = 24 as there are 6 values the prime p can take, 5, 7, 13, 17, 19 and 23 < 24 so that 24 + p is also prime.

%o (PARI) {stop=1050;m=56;v=vector(m,x,-1);for(n=1,stop,c=0;forprime(p=2,n-1,if(isprime(n+p),c++)); if(c<m&&v[c+1]<0,v[c+1]=n));for(j=1,m,print1(v[j],","))}

%o (Haskell)

%o import Data.List (elemIndex)

%o import Data.Maybe (fromJust)

%o a092954 = (+ 1) . fromJust . (`elemIndex` a092953_list)

%o -- _Reinhard Zumkeller_, Nov 10 2012

%Y Cf. A092953.

%K nonn

%O 0,2

%A _Amarnath Murthy_, Mar 24 2004

%E More terms from _Klaus Brockhaus_ and Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 25 2004