login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


a(n+1)-+a(n) = prime, a(1)=0, a(2)=2.
13

%I #6 Apr 20 2022 14:12:57

%S 0,2,5,8,11,18,23,30,37,42,47,50,53,56,75,82,85,88,91,102,109,114,119,

%T 122,129,134,137,140,143,150,157,160,171,176,183,190,193,196,201,208,

%U 211,222,227,230,233,246,253,256,267,274,297,302,305,308,311,330,343

%N a(n+1)-+a(n) = prime, a(1)=0, a(2)=2.

%C Sum and difference of any of two consecutive numbers are prime numbers: 5-2=3; 5+2=7, 230-227=3; 230+227=457, 233-230=3; 233+230=463,...

%C I assume that here and in most of the similar sequences from the same author there is an implicit assumption that we want the "Lexicographically earliest infinite sequence of distinct positive numbers" that satisfies the stated condition. - _N. J. A. Sloane_, Apr 20 2022

%t a=0;b=2;lst={a,b};Do[If[PrimeQ[n-b]&&PrimeQ[n+b],AppendTo[lst,n];a=b;b=n],{n,3,7!}];lst

%K nonn

%O 1,2

%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 | 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 September 20 23:55 EDT 2024. Contains 376078 sequences. (Running on oeis4.)