Determine the probability that for a base ten positive integer x chosen at random from 1 to 9999 inclusively, this relationship is satisfied:
(sod(x))2 = x+2, where sod(n) denotes the sum of the digits in the base ten representation of n.
Answers:
2 ,23, 62, 119, 194, 287, 398
Since 7+9+9=25 and 25^2<700 our candidate solutions can be derived examining square numbers below 700, i.e. 26 numbers at most.
The process may me mental, p&p, simple calculator or short excel table. Just to illustrate the point:…..
121==>119==>1+1+9=11 11*11 = 121: fits<br>
144==>142==>1+4+2=7 7*7 is not 144:<br>
169=>167==>1+6+7=14 14*14 is not 167:<br>
196==>194==>1+9+4=14 14*14 = 167: fits<br>
….
Analytical solution(not so time-effective): For 1 or 2 digit number N let N be 10a+b
(a+b)^2=10*a+b+2<br>
Solving for a we get a=5-b+sqrt(3-b)<br>
and a=5-b-sqrt(3-b)<br><br>
INTEGER SOLUTIONS:<br>
b=2 a=0,6 N=2 or 62<br>
b=3 a=2 N=23<br>
For 3 digit number less than 200 solve:
(a+b+1)^2=10*a+b+102 and so on.
Edited on January 27, 2011, 8:29 am