login
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

%I #4 Jun 19 2021 12:49:29

%S 3,31,37,71,89,157,163

%N 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.

%C 3+31+37=71;37-(3+31)=3,...

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

%Y Cf. A154484, A154485, A154486, A154487, A154488, A154493, A154494, A154495, A154496, A062391, A154497, A154498, A154500, A154501

%K nonn

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, Jan 10 2009

%E NAME adapted to offset. - _R. J. Mathar_, Jun 19 2021