login
A101466
Create a histogram of the digits used so far in the sequence. Add to the last element of the sequence the most used digit on the histogram. If two or more digits have the same score in the histogram, add the highest. 0 is to be interpreted as 10 and so comes after 9. So if 0 is the digit to add, add 10 instead. Start the sequence with 1.
1
1, 2, 4, 8, 16, 17, 18, 19, 20, 21, 22, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 56, 59, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121
OFFSET
1,2
LINKS
PROG
(Python)
from itertools import islice
from collections import Counter
def agen(): # generator of terms
an, c = 1, Counter()
while True:
yield an
c.update(list(str(an)))
m, argm = -1, None
for d in "1234567890":
if c[d] >= m:
m, argm = c[d], d
an += 10 if argm == "0" else int(argm)
print(list(islice(agen(), 65))) # Michael S. Branicky, Oct 03 2024
CROSSREFS
Cf. A093031.
Sequence in context: A083780 A368056 A309529 * A129851 A061681 A100787
KEYWORD
base,easy,nonn
AUTHOR
Eric Angelini, Jan 21 2005
STATUS
approved