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!)
A290706 Greatest of 4 consecutive primes with consecutive gaps 2, 4, 6. 0

%I #14 Sep 03 2017 21:57:08

%S 29,53,239,359,653,1103,1289,1439,1499,1619,2699,3539,3929,4013,4139,

%T 4649,4799,4943,8243,9473,10343,11789,12119,13913,14639,20759,21569,

%U 23753,25589,26693,26723,27749,27953,28289,29033,31259

%N Greatest of 4 consecutive primes with consecutive gaps 2, 4, 6.

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

%F a(n) = A078847(n) + 12.

%e 29 is a member of the sequence because 29 is the greatest of the 4 consecutive primes 17, 19, 23, 29 with consecutive gaps 2, 4, 6.

%p for i from 1 to 10^5 do if ithprime(i+1)=ithprime(i)+2 and ithprime(i+2)=ithprime(i)+6 and ithprime(i+3)=ithprime(i)+12 then print(ithprime(i+3)); fi; od;

%t Select[Prime@ Range@ 3500, NextPrime[#, {1, 2, 3}] == # + {2, 6, 12} &] + 12 (* _Giovanni Resta_, Aug 09 2017 *)

%o (GAP)

%o K:=3*10^7+1;; # to get all terms <= K.

%o P:=Filtered([1,3..K],IsPrime);; I:=[2,4,6];;

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

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

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

%Y Cf. A006512, A078847, A098412.

%K nonn

%O 1,1

%A _Muniru A Asiru_, Aug 09 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 September 16 19:18 EDT 2024. Contains 375977 sequences. (Running on oeis4.)