sod(n) denotes the sum of the digits of a
base ten positive integer n, and:
R
t = 11...11 (the digit 1 repeated precisely t times.)
Determine the values of t for which:
sod(Rt2) = (sod(Rt))2
10 for T=1 to 46
20 Rt=Rt*10+1
30 Rtsq=Rt*Rt
40 Rtsqs=cutspc(str(Rtsq))
45 Tot=0
50 for I=1 to len(Rtsqs)
60 Tot=Tot+val(mid(Rtsqs,I,1))
70 next
80 Tot2=0
90 Tsq=T*T
125 print T,Tot;Tsq;:if Tot=Tsq then print " *":else print
130 next
finds
t LHS RHS
1 1 1 *
2 4 4 *
3 9 9 *
4 16 16 *
5 25 25 *
6 36 36 *
7 49 49 *
8 64 64 *
9 81 81 *
10 82 100
11 85 121
12 90 144
13 97 169
14 106 196
15 117 225
16 130 256
17 145 289
18 162 324
19 163 361
20 166 400
21 171 441
22 178 484
23 187 529
24 198 576
25 211 625
26 226 676
27 243 729
28 244 784
29 247 841
30 252 900
31 259 961
32 268 1024
33 279 1089
34 292 1156
35 307 1225
36 324 1296
37 325 1369
38 328 1444
39 333 1521
40 340 1600
41 349 1681
42 360 1764
43 373 1849
44 388 1936
45 405 2025
46 406 2116
The solutions with LHS=RHS are marked with * (t=1 thru 9).
After t=9, the RHS starts to exceed the LHS at a growing rate. By t=500, the LHS = 4480 and the RHS = 250000.
|
Posted by Charlie
on 2013-10-01 19:35:16 |