Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A127521
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
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). +0
2
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; listen)
OFFSET

1,2

COMMENT

This sequence is a permutation of the positive integers.

LINKS

Leroy Quet, Home Page (listed in lieu of email address)

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: A099424 A117955 A074049 this_sequence A102399 A118318 A084937

Adjacent sequences: A127518 A127519 A127520 this_sequence A127522 A127523 A127524

KEYWORD

easy,nonn

AUTHOR

Leroy Quet Jan 17 2007

EXTENSIONS

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

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 25 20:09 EST 2009. Contains 167514 sequences.


AT&T Labs Research