login
This site is supported by donations 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). 1
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; internal format)
OFFSET

1,2

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] (*Chandler*)

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

Cf. A123088, A123721.

Sequence in context: A171401 A120329 A182800 * A171136 A189167 A010428

Adjacent sequences:  A123246 A123247 A123248 * A123250 A123251 A123252

KEYWORD

easy,nonn

AUTHOR

Leroy Quet Oct 08 2006

EXTENSIONS

Corrected and extended by Klaus Brockhaus (klaus-brockhaus(AT)t-online.de) and Ray Chandler (rayjchandler(AT)sbcglobal.net), Oct 09 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 12:38 EST 2012. Contains 206021 sequences.