login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A127521 a(1)=1. n-th run, after the initial 1, of a(n) integers is the (1st, 2nd, 3rd,.., a(n)th) integer from among those positive integers which don't occur earlier in the sequence (including earlier in the same run). 1
1, 2, 3, 5, 4, 7, 9, 6, 10, 12, 14, 16, 8, 13, 17, 19, 11, 18, 21, 23, 25, 27, 29, 15, 22, 26, 30, 32, 34, 36, 38, 40, 20, 28, 33, 37, 41, 43, 24, 35, 42, 45, 47, 49, 51, 53, 55, 57, 31, 44, 48, 52, 56, 59, 61, 63, 65, 67, 69, 71, 39, 50, 58, 62, 66, 70, 73, 75, 77, 79, 81, 83 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

COMMENTS

This sequence is a permutation of the positive integers.

EXAMPLE

The beginning of the sequence grouped by runs:

1,(2),(3,5),(4,7,9),(6,10,12,14,16),(8,13,17,19),(11,18,21,23,25,27,29),..

The n-th run, after the initial 1, has a(n) terms.

The 5th run has a(5)=4 terms. The positive integers which don't occur before this run are 8,11,13,15,17,18,19,20,... The first term of the 5th run is the first term of these integers, which is 8.

Since 8 has just occurred in the sequence, the 2nd term in the fifth run is not 11, but is instead 13. Now the positive integers that have yet to occur are 11,15,17,18,19,...For the 3rd term of the 5th run we want the 3rd of these, which is 17. And finally we want the 4th positive integer which has yet to occur in the sequence, which is 19.

MATHEMATICA

f[l_List] := Block[{r = {}, s, c, k, m}, m = Flatten[l][[Length[l]]]; Do[ s = Flatten[Append[l, r]]; c = i; k = 0; While[c > 0, k++; While[MemberQ[s, k], k++ ]; c--; ]; AppendTo[r, k]; , {i, m}]; Append[l, r]]; Flatten@Nest[f, {{1}}, 11] (*Chandler*)

CROSSREFS

Cf. A127522.

Sequence in context: A117955 A074049 A193973 * A102399 A118318 A084937

Adjacent sequences:  A127518 A127519 A127520 * A127522 A127523 A127524

KEYWORD

easy,nonn

AUTHOR

Leroy Quet Jan 17 2007

EXTENSIONS

Extended by Ray Chandler (rayjchandler(AT)sbcglobal.net), Jan 22 2007

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 14 23:53 EST 2012. Contains 205689 sequences.