A082009 a(n) is the label of parent node of node n in tree shown in A082007.
0, 0, 1, 3, 3, 1, 6, 6, 2, 9, 9, 2, 12, 12, 4, 15, 15, 16, 18, 18, 16, 21, 21, 17, 24, 24, 17, 27, 27, 4, 30, 30, 31, 33, 33, 31, 36, 36, 32, 39, 39, 32, 42, 42, 5, 45, 45, 46, 48, 48, 46, 51, 51, 47, 54, 54, 47, 57, 57, 5, 60, 60, 61, 63
Offset: 1
Links
- Ivan Neretin, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
w = {{0}}; a = ConstantArray[0, 254]; Do[k = 2^Floor@Log2[n - 1]; AppendTo[w, Flatten@Table[w[[n - k]] + (2^k - 1) i, {i, 2^k}]]; a[[w[[-1]]]] = Riffle[#, #] &@w[[-2]], {n, 2, 8}]; a (* Ivan Neretin, Mar 12 2017 *)