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!)
A154495 a(n+1)-+a(n)=prime, a(n+1)*a(n)=Average of twin prime pairs, a(1)=2,a(2)=9. 7

%I #9 Jan 02 2024 00:49:24

%S 2,9,20,33,40,141,298,435,536,687,884,1197,1244,1665,1792,2235,2486,

%T 2595,2602,3765,3784,4095,4148,4605,4868,5061,5330,6159,6220,6579,

%U 6662,7119,7162,7341,8288,10791,11438,11859,12142,12825,13274,14553,14734

%N a(n+1)-+a(n)=prime, a(n+1)*a(n)=Average of twin prime pairs, a(1)=2,a(2)=9.

%C Sum and difference of any of two consecutive numbers in current sequence are prime numbers and multiplication and any two consecutive numbers is Average of twin prime pairs : 9-2=7;9+2=11;9*2=18, ...

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

%p A:= 2,9: b:= 9:

%p for i from 3 to 100 do

%p p:= 2:

%p do

%p p:= nextprime(p);

%p k:= b + p;

%p if isprime(b*k+1) and isprime(b*k-1) and isprime(k+b) then

%p A:= A,k; b:= k; break

%p fi od od:

%p A; # _Robert Israel_, Jan 01 2024

%t a=2;b=9;lst={a,b};Do[If[PrimeQ[n-b]&&PrimeQ[n+b]&&PrimeQ[n*b-1]&&PrimeQ[n*b+1],AppendTo[lst,n];a=b;b=n],{n,b+1,9!}];lst

%Y Cf. A154484, A154485, A154486, A154487, A154488, A154493, A154494

%K nonn

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, Jan 10 2009

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

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 08:33 EDT 2024. Contains 371905 sequences. (Running on oeis4.)