N is a positive integer and F(N) denotes the sum of the base ten digits of N.
Derive an algorithm to determine the values of N such that F(2N) is divisible by 10.
(In reply to
A sequence and some thoughts. by Jer)
N F(2^N)
6 10
13 20
26 40
41 50
46 70
51 80
57 80
58 70
67 110
70 70
73 110
74 130
78 100
79 110
95 140
103 110
107 140
112 160
123 170
135 170
138 190
166 250
168 190
173 230
210 280
223 290
242 310
248 310
279 350
299 410
306 370
309 440
310 430
313 380
320 400
341 500
350 490
363 530
369 440
395 500
402 550
403 560
409 560
413 590
420 550
442 610
453 620
464 580
467 590
472 700
482 670
487 650
506 760
538 700
540 730
546 730
560 760
568 790
575 770
586 790
593 860
610 790
611 770
634 880
639 890
661 920
668 850
670 880
677 950
686 940
688 970
695 950
698 940
729 1070
740 1030
742 970
745 1010
746 1030
756 1000
766 970
833 1130
840 1090
877 1190
879 1160
882 1180
902 1210
926 1210
943 1280
964 1330
973 1370
979 1370
989 1220
1021 1370
1029 1340
1037 1400
1042 1420
1048 1420
1060 1420
1068 1450
1107 1520
1119 1430
1121 1490
1126 1510
1133 1580
1135 1550
1137 1520
1144 1600
1151 1580
1155 1700
1182 1540
1193 1580
1216 1600
1219 1550
1225 1730
1254 1720
1264 1780
1272 1630
1307 1760
1309 1730
1312 1780
1313 1760
1322 1750
1326 1810
1334 1840
1338 1810
1339 1820
1343 1850
1355 1850
1356 1810
1359 1880
1367 1850
1388 1930
1389 1880
1417 1910
1425 1880
1429 1910
1440 1900
1452 1990
1463 1940
1476 1990
1488 1990
1493 1940
1497 1970
1537 2090
1557 2150
1567 2090
1569 2150
1582 2140
1585 2180
1589 2120
1599 2150
1612 2230
1638 2260
1639 2180
1643 2120
1664 2290
1702 2230
1703 2210
1717 2360
1720 2320
1724 2380
1727 2480
1734 2260
1736 2290
1759 2360
1768 2410
1827 2510
1856 2380
1893 2510
1902 2620
1905 2690
1906 2680
1928 2560
1932 2620
1941 2690
1966 2770
1967 2750
1968 2710
1979 2750
1984 2680
5 Pw=1:kill "deuxpowd.txt"
6 open "deuxpowd.txt" for output as #2
10 for I=1 to 2000
20 Pw=Pw*2
30 if fnSod(Pw)@10=0 then
35 :print I,fnSod(Pw)
36 :print #2,I,fnSod(Pw)
40 next
50 close #2
69 end
70 fnSOD(X)
75 local S,I,SOD
80 SOD=0
90 S=cutspc(str(X))
100 for I=1 to len(S)
110 SOD=SOD+val(mid(S,I,1))
120 next
130 return(SOD)
|
Posted by Charlie
on 2015-04-12 13:27:24 |