The only numbers where the repeated digit and the number of digits are the same are 1, 88888888 and 999999999.
The sequence a(n)%10 (i.e. the last (or any) digit of a(n)), is 15-periodic. the sequence would be : 1,9,5,9,9,7,9,2,9,9,4,9,8,9,9, repeating.
For n>15, a(n) can be constructed from a(n-15) by concatenating to it 9 times a digit of a(n-15). (End)
The above two conjectures are linked, they are easily proved using modular arithmetic, and correspond to the explicit formula given below. -
M. F. Hasler, Mar 28 2025