OFFSET
0,3
COMMENTS
Terms are never multiples of 4, after a(0)=0, since a multiple of 4 is a final 0 digit in base 4/3 which can be removed for the same digit sum.
Terms are strictly increasing (and so are indices of record highs in A244041) since a(n) - 1 has sum of digits n-1 and so is an upper bound for a(n-1).
If a(n) != 3 (mod 4), then the next term is a(n+1) = a(n) + 1 by incrementing the least significant digit.
If a(n) == 3 (mod 4), then an upper bound on the next term is a(n+1) <= (a(n) - r)*4/3 + r+1, where r = a(n) mod 3, by reducing the last digit to reach a multiple of 3 then append a suitable additional digit.
LINKS
Kevin Ryde, Table of n, a(n) for n = 0..472
Kevin Ryde, C Code (revised)
EXAMPLE
For n=10, a(10) = 21 = 32131 in base 4/3 is the smallest number with sum of digits = 10.
For n=11, a(11) = 22 = 32132 in base 4/3, and which differs from a(10) simply by increasing the least significant base 4/3 digit.
PROG
(C) /* See links. */
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Kevin Ryde, Sep 28 2022
STATUS
approved