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!)
A123249 a(1) = 1. For n >= 2, a(n) = n + (smallest integer which is >= n and is missing from among the earlier terms of the sequence). 2
1, 4, 6, 9, 10, 13, 14, 16, 20, 21, 22, 24, 28, 29, 30, 33, 34, 36, 38, 43, 44, 45, 46, 49, 50, 52, 54, 59, 60, 61, 62, 64, 68, 69, 70, 73, 74, 77, 78, 80, 82, 84, 90, 91, 92, 93, 94, 96, 100, 101, 102, 105, 106, 109, 110, 112, 114, 116, 122, 123, 124, 125, 126, 129, 130 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
5 is the smallest integer which does not occur among the first 3 terms of the sequence and which is >= 4. So a(4) = 4 + 5 = 9.
MATHEMATICA
f[l_List] := Block[{n = Length[l] + 1, k = n}, While[MemberQ[l, k], k++ ]; Append[l, n + k]]; Nest[f, {1}, 70] (* Ray Chandler, Oct 09 2006 *)
PROG
(PARI) {m=65; w=vector(3*m); print1(a=1, ", "); for(n=2, m, k=n; while(w[k], k++); print1(a=n+k, ", "); w[a]=1)} \\ Klaus Brockhaus, Oct 09 2006
CROSSREFS
Sequence in context: A171401 A120329 A182800 * A171136 A189167 A283794
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Oct 08 2006
EXTENSIONS
Corrected and extended by Klaus Brockhaus and Ray Chandler, Oct 09 2006
STATUS
approved

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 June 6 13:08 EDT 2024. Contains 373128 sequences. (Running on oeis4.)