OFFSET
1,2
COMMENTS
Many integers (e.g., 6, 7, 8, 9, 15, 16...) are never present because the greedy behavior and the strictly increasing condition bypass them to avoid carries.
A subset of nonnegative integers with no decimal digits > 5 (A007092).
LINKS
Vincenzo Manto, Table of n, a(n) for n = 1..10000
FORMULA
a(1)=1; a(n) = min { x > a(n-1) | d_i(x) + d_i(a(n-1)) <= 9 }.
EXAMPLE
a(5) = 5 because a(4) = 4 and 4 is the smallest k such that 4 + k doesn't carry: 4 + 5 = 9 (no carry).
a(15) = 24 because a(14) = 23 and 24 is the smallest k such that 23 + k doesn't carry: 23 + 24 = 47 (no carry).
a(56) = 150 because a(55) = 144 and 150 is the smallest k such that 144 + k doesn't carry: 144 + 150 = 294 (no carry).
MATHEMATICA
s={1}; k=2; Do[While[Max[IntegerDigits[k]]>5||Max[IntegerDigits[s[[-1]]]+Take[IntegerDigits[k], -IntegerLength[s[[-1]]]]]> 9, k++]; AppendTo[s, k]; k++, {i, 58}]; s
PROG
(Python)
def has_carry(a, b):
while a or b:
if (a % 10) + (b % 10) > 9:
return True
a //= 10; b //= 10
return False
def sequence(n):
terms = [1]
while len(terms) < n:
k = terms[-1] + 1
while has_carry(terms[-1], k):
k += 1
terms.append(k)
return terms
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Vincenzo Manto and James C. McMahon, May 07 2026
STATUS
approved
