

A101261


a(2n1) = 1; a(2n) = a(n)th smallest positive integer not among the earlier terms of the sequence.


2



1, 2, 1, 4, 1, 3, 1, 8, 1, 5, 1, 9, 1, 6, 1, 16, 1, 7, 1, 14, 1, 10, 1, 21, 1, 11, 1, 19, 1, 12, 1, 32, 1, 13, 1, 24, 1, 15, 1, 34, 1, 17, 1, 30, 1, 18, 1, 45, 1, 20, 1, 36, 1, 22, 1, 47, 1, 23, 1, 40, 1, 25, 1, 64, 1, 26, 1, 44, 1, 27, 1, 59, 1, 28, 1, 51, 1, 29, 1, 74, 1, 31, 1, 56, 1, 33, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

The sequence {a(2k)} forms a permutation of the integers >= 2.


LINKS

Table of n, a(n) for n=1..87.


EXAMPLE

a(12) = the a(6)th (the 3rd) smallest positive integer not among the first 11 terms of the sequence. Not among the first 11 terms are 6, 7, 9, 10,... The 3rd of these is 9, which is a(12).


MATHEMATICA

a[1] = 1; a[n_] := a[n] = If[ OddQ[n], 1, Complement[ Range[100], Union[ Table[ a[i], {i, n  1}]]][[a[n/2]] ]]; Table[ a[n], {n, 90}] (* Robert G. Wilson v, Jan 13 2005 *)


CROSSREFS

Sequence in context: A256578 A127461 A329900 * A214057 A067614 A341308
Adjacent sequences: A101258 A101259 A101260 * A101262 A101263 A101264


KEYWORD

easy,nonn


AUTHOR

Leroy Quet, Dec 17 2004


EXTENSIONS

More terms from Robert G. Wilson v, Jan 13 2005


STATUS

approved



