login
A342829
a(n) is the smallest number whose sum of digits is equal to the sum of digits of n.
2
1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 2, 3, 4, 5, 6, 7, 8, 9, 19, 29, 3, 4, 5, 6, 7, 8, 9, 19, 29, 39, 4, 5, 6, 7, 8, 9, 19, 29, 39, 49, 5, 6, 7, 8, 9, 19, 29, 39, 49, 59, 6, 7, 8, 9, 19, 29, 39, 49, 59, 69, 7, 8, 9, 19, 29, 39, 49, 59, 69, 79, 8
OFFSET
1,2
LINKS
FORMULA
a(n) = A051885(A007953(n)).
EXAMPLE
For n=10, A007953(10) = 1, and 1 is the smallest integer x satisfying A007953(x)=1, so a(10)=1.
PROG
(PARI) a(n) = my(k=1, s=sumdigits(n)); while(sumdigits(k) != s, k++); k;
CROSSREFS
Cf. A007953 (sum of digits), A051885.
Sequence in context: A209685 A114570 A349194 * A247796 A355370 A326344
KEYWORD
nonn,base,look
AUTHOR
Michel Marcus, Mar 23 2021
STATUS
approved