%I #22 Jan 03 2022 16:59:32
%S 1,4,2,3,3,6,2,2,2,5,2,6,2,5,5,2,2,4,2,6,6,4,2,5,2,4,2,6,2,11,2,2,6,4,
%T 5,6,2,4,6,5,2,11,2,6,5,4,2,6,2,4,6,5,2,4,5,5,6,4,2,13,2,4,4,2,5,11,2,
%U 5,6,11,2,5,2,4,6,6,6,11,2,5,2,4,2,12,5
%N Number of values k in base n for which the sum of digits of k = sqrt(k).
%C Values of k in base n have at most 3 digits. Proof: Because sqrt(k) increases faster than the digit sum of k, only numbers with d digits meeting the condition d*(n-1) >= n^(d/2) are candidate fixed points. d < 3 for n > 6, and since there are no fixed points of four or more digits in bases 2 through 5, there are no fixed points in any base with more than 3 digits.
%C From the above, it can be shown that for three-digit fixed points of the form xyz, x <= 6; also x <= 4 for n > 846. These theoretical upper limits are statistically unlikely, and in fact of the 86356 solutions in bases 2 to 10000, only 6.5% of them begin with 2, and none begin with 3 through 6.
%H Christian N. K. Anderson, <a href="/A226087/b226087.txt">Table of n, a(n) for n = 2..10000</a>
%e For a(16)=5 the solutions are the square numbers {1, 36, 100, 225, 441} because in base 16 they are written as {1, 24, 64, E1, 1B9} and
%e sqrt(1) = 1
%e sqrt(36) = 6 = 2+4
%e sqrt(100) = 10 = 6+4
%e sqrt(225) = 15 = 14+1, and
%e sqrt(441) = 21 = 1+11+9.
%o (R) sapply(2:16,function(n) sum(sapply((1:(n^ifelse(n>6,1.5,2)))^2, function(x) sum(inbase(x,n))==sqrt(x))))
%Y Cf. A226224.
%Y Cf. digital sums for digits at various powers: A007953, A003132, A055012, A055013, A055014, A055015.
%K nonn,base
%O 2,2
%A _Christian N. K. Anderson_ and _Kevin L. Schwartz_, May 25 2013
|