|
|
A257350
|
|
a(n+1) = a(n) + smallest nonzero (and unused) integer embedded in a(n) as a (not necessarily contiguous) subchain.
|
|
2
|
|
|
1, 2, 4, 8, 16, 22, 44, 88, 176, 183, 186, 202, 222, 444, 888, 1776, 1793, 1802, 1812, 1823, 1835, 1840, 1854, 1869, 1887, 1974, 1993, 2006, 2032, 2055, 2080, 2108, 2129, 2158, 2216, 2432, 2456, 2501, 2551, 2602, 2662, 2724, 2751, 2822, 2904, 2994, 3088, 3118
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
The subchain numbers used are: 0, 1, 2, 4, 8, 6, 22, 44, 88, 7, 3, 16, 20, 222, 444, 888, 17, 9, 10, 11, 12, 5, 14, 15, 18, 87, 19, 13, 26, 23, 25, 28, 21, 29, ...
|
|
LINKS
|
|
|
EXAMPLE
|
After 186, the next term can be any of 186 + {1,8,6,18,16,86,186}, and 16 is the smallest of these that has not yet been used, so the next term is 186+16 = 202.
|
|
MATHEMATICA
|
f[n_] := Block[{used = {0}, s = Table[1, {n}], k}, For[k = 2, k <= n, k++, s[[k]] = s[[k - 1]] + SelectFirst[ FromDigits /@ Rest@ DeleteDuplicates@ Sort@ Subsets@ IntegerDigits@ s[[k - 1]], ! MemberQ[used, #] &]; AppendTo[used, s[[k]] - s[[k - 1]]] ]; s ]; f@36. (* If you want to see the "used" data as well, replace the "s" near the end of the function with "{s, used}" *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|