OFFSET
1,1
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..9999
FORMULA
a(n) = n * A097327(n).
EXAMPLE
For n = 42: 42 and 2*42 have the same number of digits, while 3*42 has more digits, so a(42) = 3*42 = 126.
MATHEMATICA
Table[n*Ceiling[10^IntegerLength[n]/n], {n, 120}] (* Michael De Vlieger, Nov 02 2024 *)
PROG
(PARI) a(n) = n * ceil(10^#digits(n) / n)
(Python)
def A377565(n): return n-1+10**(l:=len(str(n)))-(pow(10, l, n)-1)%n # Chai Wah Wu, Nov 02 2024
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Rémy Sigrist, Nov 01 2024
STATUS
approved