login
A344486
a(n) is the least k such that the sum of digits of k is a substring of n and the sum of digits of n is a substring of k.
2
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 29, 39, 49, 59, 69, 79, 89, 99, 10, 2, 399, 499, 599, 699, 799, 899, 999, 101, 11, 3, 4999, 5999, 6999, 7999, 8999, 9999, 102, 111, 12, 4, 59999, 69999, 79999, 89999, 99999, 103, 112, 112, 13, 5, 699999, 799999, 899999, 999999
OFFSET
0,3
COMMENTS
The sequence is well defined:
- for any number n with sum of digits d,
- by necessity, d <= n,
- the number k obtained by concatenating n-d 1's in front of d meets the requirements.
FORMULA
a(10 * n) = a(n).
EXAMPLE
For n = 11:
- the sum of digits of 11 is 2,
- the sum of digits of a(n) must equal 1 or 11,
- the numbers whose sum of digits is 1 are the powers of 10,
- 2 cannot be a substring of a power of 10,
- the first number with sum of digits 11 is 29,
- 2 is a substring of 29,
- so a(11) = 29.
PROG
(Perl) See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, May 21 2021
STATUS
approved