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!)
A154500 Sum of any 3 consecutive numbers is prime and |a(n+2) - (a(n+1) + a(n))| is prime, a(1)=3, a(2)=5. 3

%I #12 Nov 29 2023 20:10:36

%S 3,5,11,13,17,23,27,33,37,39,63,65,69,93,95,105,111,115,123,129,145,

%T 147,165,175,183,219,229,285,315,319,357,363,367,393,411,425,447,489,

%U 493,549,555,563,615,669,713,729,765,775,801,807,839,885,897,901,915,933,941,945,957,995,1005,1023,1051

%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)=5.

%H Robert Israel, <a href="/A154500/b154500.txt">Table of n, a(n) for n = 1..10000</a>

%e 3+5+11=19; 11-(3+5)=3, 5+11+13=29; 13-(5+11)=-3, 11+13+17=41; 17-(11+13)=-7, 13+17+23=53; 23-(13+17)=-7,... .

%p R:= 3,5: count:= 2:

%p a:= 3: b:= 5:

%p for x from b+2 by 2 while count < 100 do

%p if isprime(a+b+x) and isprime(abs(x-(a+b))) then

%p R:= R, x; a:= b; b:= x; count:= count+1;

%p fi

%p od:

%p R; # _Robert Israel_, Nov 29 2023

%t a=3;b=5;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,5,9!}];lst

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

%K nonn

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, Jan 10 2009

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

%E Corrected and extended by _Robert Israel_, Nov 29 2023

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 April 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)