OFFSET
1,1
COMMENTS
Conjecture: only 25 primes are not in the sequence, namely 2, 3, 5, 7, 11, 13, 17, 19, 31, 37, 47, 61, 67, 71, 73, 89, 109, 137, 179, 211, 277, 337, 379, 499, 557. - Alex Ratushnyak, Sep 08 2012
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
EXAMPLE
59=prime(17) -> 59-6=53=prime(16) -> 53-6=47=prime(15) ->
47-6=41=prime(13), therefore 59 is a term; also 59 -> 59-18=41=prime(13) ->
41-18=23=prime(9) -> 23-18=5=prime(3).
MATHEMATICA
prms = 3; fQ[p_] := Module[{d = 1}, While[prms*d < p && Union[PrimeQ[p - Range[prms]*d]] != {True}, d++]; prms*d < p]; Select[Prime[Range[2, PrimePi[383]]], fQ] (* T. D. Noe, Sep 08 2012 *)
PROG
(PARI) is(n)=my(t); forprime(p=2, n-6, if((n-p)%3==0 && isprime((t=(n-p)/3)+p) && isprime(2*t+p) && isprime(n), return(1))); 0 \\ Charles R Greathouse IV, Sep 10 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Apr 28 2004
STATUS
approved