login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A289907 Initial primes of 5 consecutive primes with consecutive gaps 8,6,4,2. 1

%I #34 Mar 02 2019 04:22:13

%S 1979,5399,11813,41213,42443,44249,47129,55799,57773,74699,79613,

%T 84299,88643,126473,143813,148913,167099,176489,178799,178889,209249,

%U 211859,237143,266663,267629,272249,272333,322229,344153,348443,354023,375083,391379,399263,422069,449549,521519,529673

%N Initial primes of 5 consecutive primes with consecutive gaps 8,6,4,2.

%C All terms = {23, 29} mod 30.

%C For initial primes of 5 consecutive primes with consecutive gaps 2,4,6,8 see A190814.

%C Number of terms less than 10^k: 0, 0, 0, 2, 13, 65, 317, 1563, 8671, 50643, ..., . - _Robert G. Wilson v_, Dec 07 2017

%H Robert G. Wilson v, <a href="/A289907/b289907.txt">Table of n, a(n) for n = 1..10000</a> (first 3114 terms from Muniru A Asiru)

%e Prime(299..303) = { 1979, 1987, 1993, 1997, 1999 } and 1979 + 8 = 1987, 1987 + 6 = 1993, 1993 + 4 = 1997, 1997 + 2 = 1999.

%e Also, prime(5852..5856) = { 57773, 57781, 57787, 57791, 57793 } and 5773 + 8 = 57781, 57781 + 6 = 57787, 57787 + 4 = 57791, 57791 + 2 = 57793.

%t 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 *)

%t 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 *)

%o (GAP)

%o I:=[8,6,4,2];;

%o P:=Filtered([1..1000000],IsPrime);;

%o P1:=List([1..Length(P)-1],i->P[i+1]-P[i]);; Collected(last);;

%o P2:=List([1..Length(P)-Length(I)],i->[P1[i],P1[i+1],P1[i+2],P1[i+3]]);;

%o P3:=List(Positions(P2,I),i->P[i]);

%o (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

%Y Cf. A078847, A153419, A190814, A190817, A190819, A190838.

%K nonn

%O 1,1

%A _Muniru A Asiru_, Jul 14 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 08:59 EDT 2024. Contains 371935 sequences. (Running on oeis4.)