%I #19 Feb 19 2019 03:51:42
%S 12,80,70,21,50,40,30,20,10,171,152,133,114,207,216,132,234,243,150,
%T 224,270,408,140,112,306,315,324,204,342,351,102,644,918,111,506,405,
%U 120,423,322,441,230,715,660,605,550,312,440,513,330,531,220,0,110,640
%N Let s(k) be the sum of the decimal digits of a number k. a(n) is the smallest k such that s(k)*(s(k)+n)=k, or 0 if no such k exists.
%C Proof for an explicit upper bound of a(n) [from _Nathaniel Johnston_]: Using the fact that s <= 9(log_10(k)+1) we see that if k exists then 9(log_10(k)+1)*(9(log_10(k)+1)+n) >= k. When n = 52 it then suffices to check k up to 3849. The rest of the listed values such that a(n) = 0 need to be checked up to k = 25900 to complete the proof for those values. For n = 1, 2, ..., 500 kmax is resp. 1437, 1484, ..., 26814, and the values of n such that a(n) = 0 are 52, 101, 102, 152, 206, 393, 408, 464, 473, 482, ..., and the corresponding values of kmax are 3849, 6218, 6267, 8737, 11452, 21130, 21922, 24892, 25372, 25852, ...
%e a(1) = 12 because s = 3 and 3*(3+1) = 12;
%e a(10) = 171 because s = 9 and 9*(9+10) = 171.
%p Digits := 30:
%p A190216kmax := proc(n) local k,s ; for k from 1 do s := 9*(log10(k)+1) ; if evalf(s*(s+n)) < k then return k-1; end if; end do: end proc:
%p A190216 := proc(n) local k,s; for k from 1 to A190216kmax(n) do s := add(d,d=convert(k,base,10)) ; if s*(s+n) = k then return k; end if; end do: return 0 ; end proc:
%p seq(A190216(n),n=1..54) ; # _R. J. Mathar_, Jun 03 2011
%Y Cf. A007953. Subsequence of A005349.
%K nonn,base,less
%O 1,1
%A _Michel Lagneau_, May 06 2011
|