The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A118317 a(2n-1)= smallest positive integer not occurring among the earlier terms of the sequence. a(2n) = the a(n)th positive integer among those positive integers not occurring earlier in the sequence. 4
 1, 2, 3, 5, 4, 8, 6, 12, 7, 13, 9, 19, 10, 18, 11, 27, 14, 23, 15, 32, 16, 29, 17, 42, 20, 34, 21, 45, 22, 38, 24, 58, 25, 46, 26, 57, 28, 50, 30, 71, 31, 54, 33, 72, 35, 60, 36, 89, 37, 66, 39, 84, 40, 70, 41, 100, 43, 76, 44, 96, 47, 81, 48, 121, 49, 86, 51, 112, 52, 91, 53 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Sequence is a permutation of the positive integers. LINKS Ivan Neretin, Table of n, a(n) for n = 1..10000 EXAMPLE For a(8) we want the a(4)th = 5th positive integer among those not equal to any of the first 7 terms of the sequence (those positive integers not equal to 1,2,3,5,4,8, or 6). Among those positive integers not equal to any the first 7 terms (which is the sequence 7,9,10,11,12,13...), 12 is the 5th. So a(8) = 12. Now for a(9) we want the smallest positive integer that does not occur among the first 8 terms of the sequence. So a(9) = 7. MATHEMATICA a = {1, 2}; Do[w = Complement[Range[Max[a] + a[[n]] + 1], a]; AppendTo[a, w[[1]]]; AppendTo[a, w[[a[[n]] + 1]]], {n, 2, 40}]; a (* Ivan Neretin, Jun 25 2015 *) CROSSREFS Cf. A118315, A118316, A118318. Sequence in context: A250471 A086496 A102398 * A127522 A254103 A048673 Adjacent sequences:  A118314 A118315 A118316 * A118318 A118319 A118320 KEYWORD easy,nonn AUTHOR Leroy Quet, Apr 23 2006 EXTENSIONS More terms from Joshua Zucker, May 06 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 18 16:27 EST 2020. Contains 331011 sequences. (Running on oeis4.)