The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A156324 a(1)=0, a(n+1) is smallest nonprime >= a(n)+n. 1

%I #9 Jan 22 2019 02:48:39

%S 0,1,4,8,12,18,24,32,40,49,60,72,84,98,112,128,144,161,180,200,220,

%T 242,264,287,312,338,364,391,420,450,480,511,543,576,610,645,681,718,

%U 756,795,835,876,918,961,1005,1050,1096,1143,1191,1240,1290,1341,1393,1446

%N a(1)=0, a(n+1) is smallest nonprime >= a(n)+n.

%H Harvey P. Dale, <a href="/A156324/b156324.txt">Table of n, a(n) for n = 1..1000</a>

%e a(4) is the smallest nonprime >= a(3) + 3 = 4 + 3 = 7, hence a(4)=8.

%p A141468 := proc(n) option remember ; local a ; if n = 1 then 0 ; else for a from procname(n-1)+1 do if not isprime(a) then RETURN(a) ; fi; od: fi; end: A156324 := proc(n) option remember ; local a; if n = 1 then 0; else for a from procname(n-1)+n-1 do if not isprime(a) then RETURN(a) ; fi; od: fi; end: seq(A156324(n),n=1..80) ; # _R. J. Mathar_, Feb 10 2009

%t nxt[{n_,a_}]:=Module[{k=0,c=a+n+1},While[PrimeQ[c+k],k++];{n+1,c+k}]; Transpose[NestList[nxt,{0,0},60]][[2]] (* _Harvey P. Dale_, Dec 29 2015 *)

%Y Cf. A000040, A055496, A141468.

%K nonn

%O 1,3

%A _Juri-Stepan Gerasimov_, Feb 08 2009

%E Terms beginning at a(31) corrected by _R. J. Mathar_, Feb 10 2009

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 May 14 07:57 EDT 2024. Contains 372530 sequences. (Running on oeis4.)