login
A154502
Sum of any 3 consecutive numbers is prime and a(n+2)-(a(n+1)+a(n)) is prime, a(1)=3,a(2)=31.
0
3, 31, 37, 71, 89, 157, 163
OFFSET
1,1
COMMENTS
3+31+37=71;37-(3+31)=3,...
MATHEMATICA
a=3; b=31; lst={a, b}; Do[c=Prime[n]; p1=c+a+b; p2=c-(a+b); If[PrimeQ[p1]&&PrimeQ[p2], AppendTo[lst, c]; a=b; b=c], {n, 9, 9!}]; lst
KEYWORD
nonn
AUTHOR
EXTENSIONS
NAME adapted to offset. - R. J. Mathar, Jun 19 2021
STATUS
approved