

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
(list;
graph;
refs;
listen;
history;
text;
internal format)



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 nd 1's in front of d meets the requirements.


LINKS

Table of n, a(n) for n=0..54.
Rémy Sigrist, Perl program for A344486


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

Cf. A007953, A052018, A344487.
Sequence in context: A121760 A061816 A083960 * A138795 A297233 A177895
Adjacent sequences: A344483 A344484 A344485 * A344487 A344488 A344489


KEYWORD

nonn,base


AUTHOR

Rémy Sigrist, May 21 2021


STATUS

approved



