login
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

%I #15 Nov 23 2019 04:02:57

%S 5,59,599,6799,68899,689999,6999999,77899999,779999999,7889999999,

%T 78999999999,799999999999,8689999999999,86999999999999,

%U 878999999999999,8799999999999999,88899999999999999,889999999999999999,8989999999999999999,89999999999999999999

%N 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.

%C 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.

%C a(n) <= 9*R_n for all n. Further, floor(a(n+1)/10) >= a(n) for all n. - _Derek Orr_, Jun 02 2014

%e 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.

%o (PARI) DP(n)= my(d = digits(n)); prod(i=1, #d, d[i]);

%o a(n) = {for (i=10^(n-1), 10^n-1, if (i + DP(i) >= 10^n, return(i)););}

%Y Cf. A007954, A242945, A243218.

%K nonn,base

%O 1,1

%A _Michel Marcus_, Jun 01 2014

%E a(10)-a(20) from _Derek Orr_, Jun 02 2014