OFFSET
0,2
COMMENTS
This sequence is a permutation of the nonnegative integers: repunits induce runs of consecutive equal terms of arbitrary size in A033307, thus allowing any value to eventually occur.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10000
Rémy Sigrist, Scatterplot of the first 10000 terms
Rémy Sigrist, PARI program for A337159
PROG
(PARI) See Links section.
(Python)
def aupton(terms):
alst, A033307, last, used, n, an = [], '1', 1, set(), 0, 0
while n <= terms:
while an in used: an += 1
alst += [an]; used.add(an); n += 1; an = 0
else: an += 1
return alst
print(aupton(63)) # Michael S. Branicky, Jan 30 2021
CROSSREFS
KEYWORD
AUTHOR
Rémy Sigrist, Jan 30 2021
STATUS
approved