login
A119474
a(2^m + k) = a(k)-th integer among those positive integers not occurring earlier in the sequence, where m >= 0, 1 <= k<= 2^m. a(1) = 1.
4
1, 2, 3, 5, 4, 7, 9, 12, 6, 10, 13, 16, 15, 20, 23, 27, 8, 14, 18, 22, 21, 28, 31, 35, 26, 34, 39, 43, 42, 49, 53, 58, 11, 19, 25, 32, 30, 38, 44, 48, 37, 47, 54, 59, 57, 65, 69, 74, 45, 60, 66, 72, 71, 81, 85, 90, 79, 91, 97, 102, 101, 110, 115, 121, 17, 29, 36, 46, 41, 55, 62
OFFSET
1,2
COMMENTS
Sequence is a permutation of the positive integers.
LINKS
EXAMPLE
8 = 2^2 +4. So since k = 4, we want the a(4)th = 5th positive integer from the sequence 6,8,10,11,12,13,..., i.e., from the sequence of positive integers not occurring among the first 7 terms of {a(k)}. So a(8) = 12.
MATHEMATICA
a = {1}; Do[AppendTo[a, Complement[Range[Max[a] + (d = a[[i - 2^Floor[Log2[i - 1]]]])], a][[d]]], {i, 2, 71}]; a (* Ivan Neretin, May 03 2015 *)
CROSSREFS
Sequence in context: A090252 A140140 A242693 * A308098 A029654 A297769
KEYWORD
easy,nonn,look
AUTHOR
Leroy Quet, May 22 2006
EXTENSIONS
More terms from Joshua Zucker, Jul 04 2006
STATUS
approved