A290706 Greatest of 4 consecutive primes with consecutive gaps 2, 4, 6.
29, 53, 239, 359, 653, 1103, 1289, 1439, 1499, 1619, 2699, 3539, 3929, 4013, 4139, 4649, 4799, 4943, 8243, 9473, 10343, 11789, 12119, 13913, 14639, 20759, 21569, 23753, 25589, 26693, 26723, 27749, 27953, 28289, 29033, 31259
Offset: 1
Keywords
Examples
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.
Programs
-
GAP
K:=3*10^7+1;; # to get all terms <= K. P:=Filtered([1,3..K],IsPrime);; I:=[2,4,6];; P1:=List([1..Length(P)-1],i->P[i+1]-P[i]);; P2:=List([1..Length(P)-Length(I)],i->[P1[i],P1[i+1],P1[i+2]]);; P3:=List(Positions(P2,I),i->P[i+Length(I)]);
-
Maple
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;
-
Mathematica
Select[Prime@ Range@ 3500, NextPrime[#, {1, 2, 3}] == # + {2, 6, 12} &] + 12 (* Giovanni Resta, Aug 09 2017 *)
Formula
a(n) = A078847(n) + 12.
Comments