[go: up one dir, main page]

login
A243219
Smallest n-digit integer x such that x + A007954(x) has n+1 digits, where A007954(x) is the product of decimal digits of x.
1
5, 59, 599, 6799, 68899, 689999, 6999999, 77899999, 779999999, 7889999999, 78999999999, 799999999999, 8689999999999, 86999999999999, 878999999999999, 8799999999999999, 88899999999999999, 889999999999999999, 8989999999999999999, 89999999999999999999
OFFSET
1,1
COMMENTS
The related sequence with x the largest n-digit number such that x + A007954(x) also has n digits would be 4, 90, 990, 9990, 99990, ..., etc.
a(n) <= 9*R_n for all n. Further, floor(a(n+1)/10) >= a(n) for all n. - Derek Orr, Jun 02 2014
EXAMPLE
5 is the smallest integer with 1 digit such that 5 + A007954(5) has 2 digits, with result 5 + 5 = 10, hence a(1)=5.
PROG
(PARI) DP(n)= my(d = digits(n)); prod(i=1, #d, d[i]);
a(n) = {for (i=10^(n-1), 10^n-1, if (i + DP(i) >= 10^n, return(i)); ); }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Marcus, Jun 01 2014
EXTENSIONS
a(10)-a(20) from Derek Orr, Jun 02 2014
STATUS
approved