Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A118315
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A118315 a(1) = 1. a(2n) = smallest positive integer not occurring among the earlier terms of the sequence. a(2n+1) = the a(n)th positive integer among those positive integers not occurring earlier in the sequence. +0
4
1, 2, 3, 4, 6, 5, 9, 7, 12, 8, 16, 10, 17, 11, 23, 13, 22, 14, 30, 15, 27, 18, 38, 19, 33, 20, 43, 21, 37, 24, 53, 25, 44, 26, 56, 28, 48, 29, 68, 31, 52, 32, 69, 34, 60, 35, 84, 36, 64, 39, 82, 40, 70, 41, 97, 42, 74, 45, 94, 46, 80, 47, 115, 49, 86, 50, 109, 51 (list; graph; listen)
OFFSET

1,2

COMMENT

Sequence is a permutation of the positive integers.

EXAMPLE

For a(9) we want the a(4)th = 4th positive integer among those not equal to any of the first 8 terms of the sequence (those positive integers not equal to 1,2,3,4,6,5,9, or 7). Among those positive integers not equal to any the first 8 terms (which is the sequence 8,10,11,12,13...), 12 is the 4th. So a(9) = 12.

Now for a(10) we want the smallest positive integer that does not occur among the first 9 terms of the sequence. So a(10) = 8.

MATHEMATICA

s={1}; a=Range[1000]; b=Rest[a]; Do[ c=If[OddQ[n], b[[s[[(n-1)/2]]]], b[[1]]]; b=Complement[b, {c}]; AppendTo[s, c], {n, 2, 200}]; s (Seidov)

CROSSREFS

Cf. A118316, A118317, A118318.

Sequence in context: A080997 A054582 A099884 this_sequence A075159 A095424 A064275

Adjacent sequences: A118312 A118313 A118314 this_sequence A118316 A118317 A118318

KEYWORD

easy,nonn

AUTHOR

Leroy Quet (qq-quet(AT)mindspring.com), Apr 23 2006

EXTENSIONS

More terms from Zak Seidov and Joshua Zucker, Apr 23 2006

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 18 20:14 EST 2008. Contains 147244 sequences.


AT&T Labs Research