%I #18 May 12 2017 19:41:15
%S 11,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,
%T 107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,
%U 197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283
%N Primes which are sum of 1 and two nonconsecutive primes p1 and p2, p2 - p1 > 2.
%C Conjecture: for n > 1, a(n) = prime(n+5). - _Charles R Greathouse IV_, Mar 12 2012
%C A185154(n) is the smallest prime q, such that A049084(q) + 1 < A049084(a(n) - q - 1). - _Reinhard Zumkeller_, Mar 12 2012
%H Reinhard Zumkeller, <a href="/A157996/b157996.txt">Table of n, a(n) for n = 1..10000</a>
%e 11=3+7+1, 17=5+11+1, 19=5+13+1, ...
%t lst={};Do[p0=Prime[n];Do[px=Prime[n+k];If[PrimeQ[a=p0+px+1],AppendTo[lst,a]],{k,2,2*5!}],{n,6!}];Take[Union[lst],222]
%o (Haskell)
%o a157996 n = a157996_list !! (n-1)
%o a157996_list = map (+ 1) $ filter f a006093_list where
%o f x = g $ takeWhile (< x) a065091_list where
%o g [] = False
%o g [_] = False
%o g (p:ps@(_:qs)) = (x - p) `elem` qs || g ps
%o -- _Reinhard Zumkeller_, Mar 12 2012
%o (PARI) is(n)=if(!isprime(n),return(0)); my(p=3,q=5); forprime(r=7,n-4, if(isprime(n-1-r) && n-1-r <= p, return(1)); p=q; q=r); 0 \\ _Charles R Greathouse IV_, Nov 05 2015
%Y Cf. A000040, A076805, A005385, A092738, A118071, A157995, A065091, A006093.
%K nonn
%O 1,1
%A _Vladimir Joseph Stephan Orlovsky_, Mar 11 2009
|