OFFSET
1,1
COMMENTS
All terms = {23, 29} mod 30.
FORMULA
a(n) = A078847(n) + 12.
EXAMPLE
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.
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 *)
PROG
(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)]);
CROSSREFS
KEYWORD
nonn
AUTHOR
Muniru A Asiru, Aug 09 2017
STATUS
approved
