OFFSET
1,1
COMMENTS
All terms = {23, 29} mod 30.
For initial primes of 5 consecutive primes with consecutive gaps 2,4,6,8 see A190814.
Number of terms less than 10^k: 0, 0, 0, 2, 13, 65, 317, 1563, 8671, 50643, ..., . - Robert G. Wilson v, Dec 07 2017
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..10000 (first 3114 terms from Muniru A Asiru)
EXAMPLE
Prime(299..303) = { 1979, 1987, 1993, 1997, 1999 } and 1979 + 8 = 1987, 1987 + 6 = 1993, 1993 + 4 = 1997, 1997 + 2 = 1999.
Also, prime(5852..5856) = { 57773, 57781, 57787, 57791, 57793 } and 5773 + 8 = 57781, 57781 + 6 = 57787, 57787 + 4 = 57791, 57791 + 2 = 57793.
MATHEMATICA
s = Prepend[Differences@ #, First@ #] & /@ Partition[Prime@ Range[10^5], 5, 1]; Select[s, Drop[#, 1] == Range[8, 2, -2] &][[All, 1]] (* Michael De Vlieger, Jul 14 2017 *)
p = {2, 3, 5, 7, 11}; lst = {}; While[ p[[1]] < 530000, If[ Differences@ p == {8, 6, 4, 2}, AppendTo[ lst, p[[1]] ]]; p = Join[Rest@ p, {NextPrime[ p[[-1]]] }]]; lst (* Robert G. Wilson v, Dec 07 2017 *)
PROG
(GAP)
I:=[8, 6, 4, 2];;
P:=Filtered([1..1000000], IsPrime);;
P1:=List([1..Length(P)-1], i->P[i+1]-P[i]);; Collected(last);;
P2:=List([1..Length(P)-Length(I)], i->[P1[i], P1[i+1], P1[i+2], P1[i+3]]);;
P3:=List(Positions(P2, I), i->P[i]);
(PARI) is(n) = my(q); forstep(i=8, 2, -2, q=nextprime(n+1); if(q-n!=i, return(0)); n=q); return(1) \\ David A. Corneth, Jul 23 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Muniru A Asiru, Jul 14 2017
STATUS
approved