OFFSET
1,2
LINKS
S. W. Golomb, Sums and products of digits, IEEE Information Theory Society Newsletter, 51 (No. 3, Sept. 2001), p. 15.
S. W. Golomb, Sums and Products of Digits Solutions, IEEE Information Theory Society Newsletter, Vol. 67, No. 1, March 2017, p. 22. Reprint.
FORMULA
1 followed by 0's followed by 9's; the first time r 0's appear is at n = (10^r-1)/9+r+2.
PROG
(Python)
def k(r): return (10**r - 1)//9 + r + 2
def a(n):
r = 0
while k(r+1) <= n: r += 1
return int('1' + '0'*r + '9'*(n-r-1))
print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Jan 19 2021
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
N. J. A. Sloane, Dec 11 2001
STATUS
approved