OFFSET
1,1
COMMENTS
Consecutive primes 17, 19, 23, 29, 31 give the pattern of first differences 2, 4, 6, 2 in which the neighboring differences of 6 are not equal to 6.
a(n) - 6 can be prime but not the prime immediately previous to a(n); e.g., 23 - 6 = 17, but the prime 19 lies between the two primes 17 and 23.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
N:= 3000: # to get all terms <= N
Primes:= select(isprime, [seq(i, i=3..N, 2)]):
d:= Primes[2..-1]-Primes[1..-2]:
R:= select(t -> d[t] = 6 and d[t+1] <> 6 and d[t-1] <> 6, [$2..nops(d)-1]):
Primes[R]; # Robert Israel, May 29 2018
PROG
(PARI) lista(nn) = {vp = primes(nn); vd = vector(#vp-1, k, vp[k+1] - vp[k]); for (i=2, #vd, if ((vd[i] == 6) && (vd[i-1] !=6) && (vd[i+1] != 6), print1(vp[i], ", ")); ); } \\ Michel Marcus, May 29 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jan 25 2000
STATUS
approved