A289907 Initial primes of 5 consecutive primes with consecutive gaps 8,6,4,2.
1979, 5399, 11813, 41213, 42443, 44249, 47129, 55799, 57773, 74699, 79613, 84299, 88643, 126473, 143813, 148913, 167099, 176489, 178799, 178889, 209249, 211859, 237143, 266663, 267629, 272249, 272333, 322229, 344153, 348443, 354023, 375083, 391379, 399263, 422069, 449549, 521519, 529673
Offset: 1
Keywords
Examples
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.
Links
- Robert G. Wilson v, Table of n, a(n) for n = 1..10000 (first 3114 terms from Muniru A Asiru)
Programs
-
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]);
-
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 *)
-
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
Comments