找回密码
 欢迎注册
楼主: 王守恩

[灌水] 这样的A有多少个?

[复制链接]
发表于 2024-2-24 16:08:26 | 显示全部楼层
A^2有4432个结果,以最高两位98为例:
  1. Select[98*10^8+FromDigits/@Permutations[Range[0,7],{8}],Times@@Tally[IntegerDigits[#^2]][[All,2]]==2^10&]
复制代码


{9801753624,9801763524,9804317625,9804631275,9804652317,9804731652,9806473512,9806732514,9807213465,9807653421,9814562370,9814753620,9815763402,9816254073,9816452073,9817542063,9817603542,9820156743,9820536417,9820547631,9821365740,9821403567,9823407516,9824037165,9824513670,9824705613,9824710356,9825413670,9825640137,9827041635,9827456013,9827650341,9827650431,9830127645,9830167425,9832140567,9834652071,9835016427,9835724160,9837621045,9840312576,9840567213,9842573106,9843061752,9845371062,9846213057,9847365012,9847561032,9852763014,9853024671,9853210647,9853267140,9853426017,9856073124,9857064132,9857162430,9857246103,9857324601,9857360421,9861034572,9863245017,9863415207,9864527013,9865017243,9865403721,9867521340,9871054236,9871065423,9874123560,9875146302,9876104253,9876124053,9876153024}
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2024-2-25 08:11:20 | 显示全部楼层
本帖最后由 王守恩 于 2024-2-25 18:12 编辑

数字串T(n): x*x各个数位上的数码和=9*T。求最小的T(n)。
数字串A(n): x*x各个数位上的数码和=9(x+A)。求最小的A(n)。
z=x*x的位数,T<45,z=正确值,T>44,z=估算值。
估算值=Round[(n*36)/33]
T = x + A,  2*x - y=z
01=01+00, 2*01-1=01,
02=02+00, 2*02-1=03,
03=02+01, 2*02-0=04,
04=03+01, 2*03-1=05,
05=04+01, 2*04-1=07,
06=04+02, 2*04-1=07,
07=04+03, 2*04-0=08,
08=05+03, 2*05-0=10,
09=05+04, 2*05-0=10,
10=06+04, 2*06-0=12,
11=07+04, 2*07-1=13,
12=07+05, 2*07-0=14,
13=08+05, 2*08-1=15,
14=08+06, 2*08-0=16,
15=09+06, 2*09-1=17,
16=09+07, 2*09-0=18,
17=10+07, 2*10-1=19,
18=10+08, 2*10-0=20,
19=11+08, 2*11-1=21,
20=11+09, 2*11-0=22,
21=12+09, 2*12-0=24,
22=13+09, 2*13-1=25,
23=13+10, 2*13-0=26,
24=14+10, 2*14-1=27,
25=14+11, 2*14-0=28,
26=15+11, 2*15-1=29,
27=15+12, 2*15-0=30,
28=16+12, 2*16-1=31,
29=16+13, 2*16-0=32,
30=17+13, 2*17-0=34,
31=18+13, 2*18-1=35,
32=18+14, 2*18-0=36,
33=18+15, 2*18-0=36,
34=19+15, 2*19-0=38,
35=20+15, 2*20-1=39,
36=20+16, 2*20-0=40,
37=21+16, 2*21-1=41,
38=21+17, 2*21-0=42,
39=22+17, 2*22-1=43,
40=22+18, 2*22-0=44,
41=23+18, 2*23-0=46,
42=23+19, 2*23-0=46,
43=24+19, 2*24-1=47,
44=24+20, 2*24-0=48,
45=25+20, 2*25-1=49,
46=25+21, 2*25-0=50,
47=26+21, 2*26-1=51,
48=26+22, 2*26-0=52,
49=27+22, 2*27-1=53,
50=28+22, 2*28-1=55,
51=28+23, 2*28-0=56,
52=29+23, 2*29-1=57,
53=29+24, 2*29-0=58,
54=30+24, 2*30-1=59,
55=30+25, 2*30-0=60,
56=31+25, 2*31-1=61,
57=31+26, 2*31-0=62,
58=32+26, 2*32-1=63,
59=32+27, 2*32-0=64,
60=33+27, 2*33-1=65,
61=34+27, 2*34-1=67,
62=34+28, 2*34-0=68,
63=35+28, 2*35-1=69,
64=35+29, 2*35-0=70,
65=36+29, 2*36-1=71,
66=36+30, 2*36-0=72,
67=37+30, 2*37-1=73,
68=37+31, 2*37-0=74,
69=38+31, 2*38-1=75,
70=38+32, 2*38-0=76,
71=39+32, 2*39-1=77,
72=40+32, 2*40-1=79,
73=40+33, 2*40-0=80,
74=41+33, 2*41-1=81,
75=41+34, 2*41-0=82,
76=42+34, 2*42-1=83,
77=42+35, 2*42-0=84,
78=43+35, 2*43-1=85,
79=43+36, 2*43-0=86,
80=44+36, 2*44-1=87,
81=44+37, 2*44-0=88,
82=45+37, 2*45-1=89,
83=46+37, 2*46-1=91,
84=46+38, 2*46-0=92,
85=47+38, 2*47-1=93,
86=47+39, 2*47-0=94,
87=48+39, 2*48-1=95,
88=48+40, 2*48-0=96,
89=49+40, 2*49-1=97,
90=49+41, 2*49-0=98,
91=50+41, 2*50-1=99,
92=50+42, 2*50-0=00,
93=51+42, 2*51-1=01,
94=52+42, 2*52-1=03,
95=52+43, 2*52-0=04,
96=53+43, 2*53-1=05,
97=53+44, 2*53-0=06,
98=54+44, 2*54-1=07,
99=54+45, 2*54-0=08,
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2024-2-25 08:25:40 | 显示全部楼层
T(n)T=Round[(n*36)/33]
T(n) -,T(n)+由46#数字串(1), 数字串(2)来。
T(n)T=9k+0,T(n) -=9k-1,9k-2,9k-3,9k-4,T(n)+=9k+1,9k+2,9k+3,9k+4,

T(01) -=
T(01)T=01
T(01)+=
T(02) -=
T(02)T=02
T(02)+=
T(03) -=
T(03)T=03
T(03)+=
T(04) -=
T(04)T=04
T(04)+=06
T(05) -=
T(05)T=05
T(05)+=
T(06) -=
T(06)T=07
T(06)+=
T(07) -=
T(07)T=08
T(07)+=
T(08) -=
T(08)T=09
T(08)+=10
T(09) -=
T(09)T=10
T(09)+=
T(10) -=11
T(10)T=11
T(10)+=
T(11) -=
T(11)T=12
T(11)+=
T(12) -=14
T(12)T=13
T(12)+=
T(13) -=
T(13)T=14
T(13)+=15
T(14) -=
T(14)T=15
T(14)+=
T(15) -=
T(15)T=16
T(15)+=18
T(16) -=
T(16)T=17
T(16)+=
T(17) -=
T(17)T=19
T(17)+=19
T(18) -=
T(18)T=20
T(18)+=
T(19) -=
T(19)T=21
T(19)+=22
T(20) -=
T(20)T=22
T(20)+=
T(21) -=23
T(21)T=23
T(21)+=
T(22) -=
T(22)T=24
T(22)+=
T(23) -=26
T(23)T=25
T(23)+=
T(24) -=
T(24)T=26
T(24)+=27
T(25) -=
T(25)T=27
T(25)+=
T(26) -=
T(26)T=28
T(26)+=30
T(27) -=
T(27)T=29
T(27)+=
T(28) -=
T(28)T=31
T(28)+=31
T(29) -=
T(29)T=32
T(29)+=
T(30) -=
T(30)T=33
T(30)+=34
T(31) -=
T(31)T=34
T(31)+=
T(32) -=35
T(32)T=35
T(32)+=
T(33) -=
T(33)T=36
T(33)+=
T(34) -=38
T(34)T=37
T(34)+=
T(35) -=
T(35)T=38
T(35)+=39
T(36) -=
T(36)T=39
T(36)+=
T(37) -=
T(37)T=40
T(37)+=42
T(38) -=
T(38)T=41
T(38)+=
T(39) -=
T(39)T=43
T(39)+=43
T(40) -=
T(40)T=44
T(40)+=
T(41) -=
T(41)T=45
T(41)+=46
T(42) -=
T(42)T=46
T(42)+=
T(43) -=47
T(43)T=47
T(43)+=
T(44) -=
T(44)T=48
T(44)+=
T(45) -=50
T(45)T=49
T(45)+=
T(46) -=
T(46)T=50
T(46)+=51
T(47) -=
T(47)T=51
T(47)+=
T(48) -=
T(48)T=52
T(48)+=54
T(49) -=
T(49)T=53
T(49)+=
T(50) -=
T(50)T=55
T(50)+=55
T(51) -=
T(51)T=56
T(51)+=
T(52) -=
T(52)T=57
T(52)+=58
T(53) -=
T(53)T=58
T(53)+=
T(54) -=59
T(54)T=59
T(54)+=
T(55) -=
T(55)T=60
T(55)+=
T(56) -=62
T(56)T=61
T(56)+=
T(57) -=
T(57)T=62
T(57)+=63
T(58) -=
T(58)T=63
T(58)+=
T(59) -=
T(59)T=64
T(59)+=66
T(60) -=
T(60)T=65
T(60)+=
T(61) -=
T(61)T=67
T(61)+=67
T(62) -=
T(62)T=68
T(62)+=
T(63) -=
T(63)T=69
T(63)+=70
T(64) -=
T(64)T=70
T(64)+=
T(65) -=71
T(65)T=71
T(65)+=
T(66) -=
T(66)T=72
T(66)+=
T(67) -=74
T(67)T=73
T(67)+=
T(68) -=
T(68)T=74
T(68)+=75
T(69) -=
T(69)T=75
T(69)+=
T(70) -=
T(70)T=76
T(70)+=78
T(71) -=
T(71)T=77
T(71)+=
T(72) -=
T(72)T=79
T(72)+=79
T(73) -=
T(73)T=80
T(73)+=
T(74) -=
T(74)T=81
T(74)+=82
T(75) -=
T(75)T=82
T(75)+=
T(76) -=83
T(76)T=83
T(76)+=
T(77) -=
T(77)T=84
T(77)+=
T(78) -=86
T(78)T=85
T(78)+=
T(79) -=
T(79)T=86
T(79)+=87
T(80) -=
T(80)T=87
T(80)+=
T(81) -=
T(81)T=88
T(81)+=90
T(82) -=
T(82)T=89
T(82)+=
T(83) -=
T(83)T=91
T(83)+=91
T(84) -=
T(84)T=92
T(84)+=
T(85) -=
T(85)T=93
T(85)+=94
T(86) -=
T(86)T=94
T(86)+=
T(87) -=95
T(87)T=95
T(87)+=
T(88) -=
T(88)T=96
T(88)+=
T(89) -=98
T(89)T=97
T(89)+=
T(90) -=
T(90)T=98
T(90)+=99
T(91) -=
T(91)T=99
T(91)+=
T(92) -=
T(92)T=00
T(92)+=02
T(93) -=
T(93)T=01
T(93)+=
T(94) -=
T(94)T=03
T(94)+=03
T(95) -=
T(95)T=04
T(95)+=
T(96) -=
T(96)T=05
T(96)+=06
T(97) -=
T(97)T=06
T(97)+=
T(98) -=07
T(98)T=07
T(98)+=
T(99) -=
T(99)T=08
T(99)+=
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2024-2-25 09:33:00 | 显示全部楼层
多说两句?
若T(n)=偶数,则x=T(n)/2, A=n-T(n)/2。
若T(n)=奇数,则x=(T(n)+1)/2, A=n-(T(n)+1)/2。
若T(n) -,T(n)+=偶数,则T(n) -,T(n)+由数字串(1)来。
若T(n) -,T(n)+=奇数,则T(n) -,T(n)+由数字串(2)来。
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2024-2-25 11:24:40 | 显示全部楼层
Python 的整数类型有无限精度,正好用来做这个题。

附件是 Python 代码和计算结果 (n = 1 ~ 2048) :
平方数数码之和.part1.rar (160 KB, 下载次数: 2)
平方数数码之和.part2.rar (154.89 KB, 下载次数: 2)

A 是由 n 个相同数码组成的 n 位数,
A * A 各个数位上的数码和 = 9 * n ,
n = 1 ~ 2024,这样的 A 有多少个?
答案:8991 个。

2024 * 9 = 18216
8991 / 18216 = 49.36%


点评

运行时间约 4 分钟。  发表于 2024-2-25 11:26

评分

参与人数 1威望 +6 金币 +6 贡献 +6 经验 +6 鲜花 +6 收起 理由
王守恩 + 6 + 6 + 6 + 6 + 6 很给力!

查看全部评分

毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2024-2-25 12:24:08 | 显示全部楼层
northwolves 发表于 2024-2-21 15:34
a(162)>123000000000

153 1001283601183


修改前面的代码,并且合并两个代码最优结果,可以得到如下结果(同样两边搜索长度之和选择为41)
  1. 100 10954437
  2. 101 5477133
  3. 102 9272917
  4. 103 100427083
  5. 104 13415614
  6. 105 9893887
  7. 106 102419626
  8. 107 19672313
  9. 108 103860387
  10. 109 20736417
  11. 110 24060133
  12. 111 1001798327
  13. 112 104258333
  14. 113 29983327
  15. 114 1003487917
  16. 115 113578114
  17. 116 44271886
  18. 117 129984576
  19. 118 82395387
  20. 119 60827617
  21. 120 1004489417
  22. 121 164277083
  23. 122 99477133
  24. 123 1034407076
  25. 124 197222917
  26. 125 1035857133
  27. 126 260191833
  28. 127 197483417
  29. 128 10028903114
  30. 129 1140086833
  31. 130 434738887
  32. 131 10029954614
  33. 132 1224291587
  34. 133 529027313
  35. 134 1260872313
  36. 135 706399164
  37. 136 100044889864
  38. 137 10049328286
  39. 138 1664331667
  40. 139 994927133
  41. 140 10343113114
  42. 141 2641873937
  43. 142 10237040583
  44. 143 2428989417
  45. 144 2983284917
  46. 145 100344331667
  47. 146 10945318633
  48. 147 5383305583
  49. 148 100497756164
  50. 149 13038404764
  51. 150 8882454614
  52. 151 17204034117
  53. 152 9380293167
  54. 153 1000494027313
  55. 154 103382242126
  56. 155 21213179863
  57. 156 1001790341833
  58. 157 109402911113
  59. 158 31144643167
  60. 159 104345531667
  61. 160 28105157886
  62. 161 59999833333
  63. 162 1004380206833
  64. 163 109452720386
  65. 164 69999835714
  66. 165 1004484937567
  67. 166 134123072917
  68. 167 94286790167
  69. 168 109544510583
  70. 169 99497231067
  71. 170 10004818333633
  72. 171 1024695027313
  73. 172 240827299117
  74. 173 10018981984063
  75. 174 1090825328813
  76. 175 244272388937
  77. 176 1174223143167
  78. 177 538479339417
  79. 178 806207101183
  80. 179 10049371516667
  81. 180 1256975731667
  82. 181 926174913167
  83. 182 10094057602664
  84. 183 1296109172867
  85. 184 10245965044833
  86. 185 1974763271886
  87. 186 2213594339417
  88. 187 100133361063583
  89. 188 10435511007133
  90. 189 3144835432874
  91. 190 100049936529614
  92. 191 11175821177837
  93. 192 3160522105583
  94. 193 11313706234917
  95. 194 4472135831667
  96. 195 5474468010583
  97. 196 100483530987917
  98. 197 12193805763583
  99. 198 9892825177313
  100. 199 100993360672867
  101. 200 13740377720386
  102. 201 102853244965824
  103. 202 14106593458167
  104. 203 22108798881667
  105. 204 1001997947527837
  106. 205 103917751072567
  107. 206 29999983333327
  108. 207 1003389245896063
  109. 208 122473544024777
  110. 209 75498211766822
  111. 210 122057363546367
  112. 211 62441868958167
  113. 212 70695827316667
  114. 213 1019258504943167
  115. 214 134081680328813
  116. 215 89324067192437
  117. 216 1032947233308167
  118. 217 218837793765083
  119. 218 1033914890061063
  120. 219 244744764757083
  121. 220 314451904109293
  122. 221 10029346433286667
  123. 222 1048284312531667
  124. 223 599999983333333
  125. 224 10033941896856833
  126. 225 1182788226522383
  127. 226 608275330724417
  128. 227 1260515763483333
  129. 228 836594274358167
  130. 229 943291047332683
  131. 230 10098465179892437
  132. 231 1360146675177313
  133. 232 100099943251726117
  134. 233 10342571681597764
  135. 234 2167948082842133
  136. 235 10339143096407313
  137. 236 2445403011773313
  138. 237 2641018364192114
  139. 238 100337824323083167
  140. 239 12206133703183363
  141. 240 6927459779738887
  142. 241 100493283294402313
  143. 242 13036794084382433
  144. 243 5375861596060663
  145. 244 13034531061556833
  146. 245 9983486364492063
  147. 246 9949874270443813
  148. 247 102371381541913363
  149. 248 24474467305722917
  150. 249 1000449848766989417
  151. 250 108443524467807563
  152. 251 16733200200191833
  153. 252 109535381471001414
  154. 253 44698630849165614
  155. 254 31622774688331667
  156. 255 1004290788964973924
  157. 256 109357212336452683
  158. 257 70494609012957083
  159. 258 1008910252647671333
  160. 259 132663095727108637
  161. 260 83066231922477313
  162. 261 167032630943744043
  163. 262 141062751917357687
  164. 263 10006797119958013813
  165. 264 1043791118657318333
  166. 265 173117849451724613
  167. 266 10023761070361763167
  168. 267 1044020483515044833
  169. 268 299999998333333327
  170. 269 1086277587450785937
  171. 270 435866837461509417
  172. 271 447213595487659543
  173. 272 10049855670555642313
  174. 273 1180254209818799117
  175. 274 884872476574958167
  176. 275 10147304464727959417
  177. 276 1371087155507981917
  178. 277 758946572361980563
  179. 278 1996994987474680563
  180. 279 707106074079263583
  181. 280 100049937411274724684
  182. 281 10486658189331989417
  183. 282 2785480209927724417
  184. 283 100239159011830301264
  185. 284 10478539974576557867
  186. 285 5999999998333333333
  187. 286 12453874858814022867
  188. 287 5467172934890572764
  189. 288 7063993189247842133
  190. 289 100279608495445872313
  191. 290 13709449219384307563
  192. 291 9429681807356492126
  193. 292 100925219344309472687
  194. 293 13037982934483960583
  195. 294 102956243073875704626
  196. 295 14141782065920722917
  197. 296 22331368049897411063
  198. 297 1001798381911169778167
  199. 298 101979845998050016667
  200. 299 29964628614384477133
  201. 300 1003289040586001809417
  202. 301 122474487053377692437
  203. 302 69280435174650779614
  204. 303 126014280452653451637
  205. 304 77453069648658793167
  206. 305 89441594903993074417
  207. 306 1013403028803841694833
  208. 307 130268952475254048517
  209. 308 10004444011932396734687
  210. 309 1038214811924680151786
  211. 310 141378562727837168333
  212. 311 94180040294109027313
  213. 312 262087386170528775387
  214. 313 223584183022838178583
  215. 314 10003949119062925341833
  216. 315 1095445064756466913583
  217. 316 435877272864734253937
  218. 317 10033942246091004683363
  219. 318 1256940609965275041833
  220. 319 741551749981004224417
  221. 320 1303755689873988238887
  222. 321 754718284918279954614
  223. 323 10310188644733906962083
  224. 324 1413081381198439327133
  225. 326 10317926146760258672687
  226. 327 2190638491396718286667
  227. 328 10428805779666241294542
  228. 329 2827719752694560960583
  229. 330 2999999999833333333327
  230. 332 11704272510480903443167
  231. 333 2976388751488907738914
  232. 335 12609000708220259236417
  233. 336 8244385168100697671333
  234. 337 13408542049715882477313
  235. 338 8882505274864168010583
  236. 341 22360389084025298775583
  237. 344 24490814584000030724417
  238. 346 43566041821463294027313
  239. 347 44721359538546565724417
  240. 350 70497517615005252750707
  241. 353 83486465909152004768333
  242. 355 99689518004050952477133
复制代码

但是现在这种方案找到的结果会遇上比较大的问题
比如263找到的当前最佳结果为10006797119958013813,长度20,其平方为100135988599999999889698999959898798969(长度39),数码和为283,搜索自由度需要(39*9-283=68)。
比较有利的条件是差值为263的数据,其长度如果小于20,那么由于平方和模9余数只能为0,1,4,7, 而283模9余数为4, 那么只能让寻找长度降低到17,数码和为280的数。
而长度为17的平方数长度为17*2=34,如果数字全部为9和才为34*9=306,给280的自由度只有26,远远小于我们的搜索范围41,所以不需要考虑,唯一的问题是20位数中是否还有小于
10006797119958013813的数,因为现在只使用了自由度41,而我们需要验证自由度小于68的数,比较有利的是我们只需要搜索小于10013或者更小开头的5位数,这5位数码和最大为10009,已经占用了35的自由度,对应搜索空间其实也不大,只是需要再修改专门的程序找出是否有更小的同样位数的结果 (所有需要验证的数据都应该是平方后前几位比较小的,特别对于整数比较小的时候)。
  1. 111 requires 50 with value 1039225192 and square 1003599887979998929
  2. 114 requires 47 with value 1029563014 and square 1006987999564998889
  3. 128 requires 50 with value 10344080383 and square 100578897669998896996
  4. 131 requires 47 with value 10392303883 and square 100599989558899888996
  5. 136 requires 59 with value 103435970528 and square 10008979987899889938496
  6. 145 requires 50 with value 104345579684 and square 10068984897696898998889
  7. 148 requires 47 with value 103923000293 and square 10099798993998799994896
  8. 153 requires 59 with value 1034407994942 and square 1000988298688985989999969
  9. 156 requires 56 with value 1039177559417 and square 1003583888989878989799889
  10. 162 requires 50 with value 1038749247412 and square 1008779599877899859889889
  11. 165 requires 47 with value 1043546836513 and square 1008989989798979887879489
  12. 170 requires 59 with value 10392299986043 and square 100096389888998998898978689
  13. 173 requires 56 with value 10440253828327 and square 100379999996978967985987969
  14. 179 requires 50 with value 10440306494543 and square 100989867879997999858788889
  15. 182 requires 47 with value 10487130160343 and square 101889998885898898899896896
  16. 184 requires 45 with value 10488040713117 and square 104979799699939699699997889
  17. 187 requires 59 with value 103918237090031 and square 10026689997889879988968797889
  18. 190 requires 56 with value 104403063652366 and square 10009989799579789889898988996
  19. 196 requires 50 with value 109493835396793 and square 10096939999799675989999998889
  20. 199 requires 47 with value 109539901401178 and square 10199658899999798778989999689
  21. 201 requires 45 with value 104393485907886 and square 10578789999999799998927998976
  22. 204 requires 59 with value 1043977969111417 and square 1003999886849997989979889898569
  23. 207 requires 56 with value 1048713497529233 and square 1006789978779869979887798899969
  24. 213 requires 50 with value 1048331531524736 and square 1038887899898979987773899989889
  25. 216 requires 47 with value 1095440550600533 and square 1066979986798996788998788899889
  26. 218 requires 45 with value 1135781669138043 and square 1068979999889979989859868689969
  27. 221 requires 59 with value 10391823709051264 and square 100587789878879988796899799968889
  28. 224 requires 56 with value 10487130208021633 and square 100679989989498899889884898789889
  29. 230 requires 50 with value 10392304845413167 and square 101978998989499989979698889798969
  30. 232 requires 65 with value 103923000341599063 and square 10019998638998788989988699979897689
  31. 233 requires 47 with value 10487564064166658 and square 106968788988987999797999889799696
  32. 235 requires 45 with value 11815244390193543 and square 106897879967986999999887999879969
  33. 238 requires 59 with value 104880884292558286 and square 10067678989889899999999948798749889
  34. 241 requires 56 with value 103874919975901786 and square 10098899987288998998999879899749969
  35. 247 requires 50 with value 109539946909791772 and square 10479899758799999998998698997969769
  36. 249 requires 65 with value 1038749247893783074 and square 1000899899897891995898789997789999889
  37. 250 requires 47 with value 122433161357493337 and square 11759997998999977589987939999998969
  38. 252 requires 45 with value 122470403767481676 and square 11997999793997799889899799989999396
  39. 255 requires 59 with value 1090403595005078383 and square 1008599988799889789997998897999957776
  40. 258 requires 56 with value 1048804079892903544 and square 1017899897897587999999889987589996889
  41. 263 requires 68 with value 10488088476838379531 and square 100135988599999999889698999959898798969
  42. 264 requires 50 with value 1178554194714863333 and square 1089499899387895999799999978897898889
  43. 266 requires 65 with value 10440306029997348214 and square 100475785995699999999999889968997869889
  44. 267 requires 47 with value 1224703637130215678 and square 1089978769998987999895899857999997889
  45. 269 requires 45 with value 1182751021982225133 and square 1179998996997899888998995998996967969
  46. 272 requires 59 with value 10908666279155715374 and square 100999598998999398999898667799995989969
  47. 275 requires 56 with value 11401666499683280948 and square 102967787899887978979999799888798979889
  48. 280 requires 68 with value 104833153105298707313 and square 10009989975999989757799988979899998899856
  49. 281 requires 50 with value 12246632189994112814 and square 109969999979883678797998988598999999889
  50. 283 requires 65 with value 103923048454132156483 and square 10047888999398999898979949979996999997696
  51. 284 requires 47 with value 12996145582006227664 and square 109799799998798889989699769889999589689
  52. 286 requires 45 with value 13404812568249471417 and square 155098998998999997998999388999998899689
  53. 289 requires 59 with value 109539942482183177837 and square 10055999879999899966997998999989499969969
  54. 292 requires 56 with value 117472890489678510719 and square 10185899899696978987968999887999998999969
  55. 294 requires 54 with value 118236627103871243676 and square 10599987987886978999998979969987997799876
  56. 297 requires 68 with value 1095394905958531422958 and square 1003599997999837978997889859898899989879889
  57. 298 requires 50 with value 126094289719994854333 and square 10399888989785997999999988998998977788889
  58. 300 requires 65 with value 1085817664251226845914 and square 1006588898959979985959887899999997989879889
  59. 301 requires 47 with value 122474487053377692437 and square 14999999978987979999779887687898966998969
  60. 303 requires 45 with value 134089522334140596714 and square 15879598877999997799997899998889897979769
  61. 306 requires 59 with value 1135297313037426333184 and square 1026985698788799999798989778999989898897889
  62. 308 requires 74 with value 10440296930638515129836 and square 100088899987889989978299989889968979868987969
  63. 309 requires 56 with value 1170465719233156349684 and square 1077889995699798979898939987998979998989796
  64. 314 requires 68 with value 10954446494460137258843 and square 100078997976799879996989987988898799899799889
  65. 315 requires 50 with value 1224736706398513965883 and square 1199999889899299989699865999969789989897889
  66. 317 requires 65 with value 10862734462371755407633 and square 100679996997889795989967999958989999888989769
  67. 318 requires 47 with value 1377679200612384581122 and square 1579899696979877679799898898979699899999889
  68. 320 requires 45 with value 1403210604277918072917 and square 1699778898878798998899889997998799778998769
  69. 323 requires 59 with value 11357376413107034069426 and square 106299989889999997188979989799897897999698889
  70. 326 requires 56 with value 11747340124045097214037 and square 106459599969998998989858899997999798999799969
  71. 328 requires 54 with value 11827510257868728637884 and square 108759989989999998966899978978988999998989764
  72. 332 requires 50 with value 12961091767285655623883 and square 136989994999598949999878998999989875998989889
  73. 335 requires 47 with value 13740443950906389836813 and square 158986898859898998999899498897698999898997889
  74. 337 requires 45 with value 13408542049715882477313 and square 179788999898998998999899785789997797959699969
  75. 346 requires 45 with value 44697751621082686142937 and square 1897999999989488769979889989869689898789999969
  76. 347 requires 44 with value 59999999999833333333333 and square 1999999998975949897989898898969799479989989889
复制代码

点评

这些天文数字对硬件要求也不低  发表于 2024-2-25 18:26
相当于上面列表中requires后数据不超过59并且square后面开头三位不大于103的都已经通过。第一个还没有验证应该是184,然后201, 216,218, 232, 233,235,...  发表于 2024-2-25 15:40
又试着将10*开头的数据(要求*不超过3)扩大搜索范围遍历了一下,没有找到更好的结果  发表于 2024-2-25 15:34
这部分数据离确认最优还有差距,所以还是不要更新了  发表于 2024-2-25 15:34
mathe版主方便时更新一下b369956.txt  发表于 2024-2-25 14:33

评分

参与人数 1威望 +8 金币 +8 贡献 +8 经验 +8 鲜花 +8 收起 理由
northwolves + 8 + 8 + 8 + 8 + 8 赞一个!

查看全部评分

毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2024-2-25 13:11:35 | 显示全部楼层
Jack315 发表于 2024-2-25 11:24
Python 的整数类型有无限精度,正好用来做这个题。

附件是 Python 代码和计算结果 (n = 1 ~ 2048) :

谢谢 Jack315! 宝贵资料我慢慢来消化。谢谢 Jack315!
主帖增加后变成如下的题目:
A*A各个数位上的数码和=9*1。A最小=3。
A*A各个数位上的数码和=9*2。A最小=24。
A*A各个数位上的数码和=9*3。A最小=63。
A*A各个数位上的数码和=9*4。A最小=264。
A*A各个数位上的数码和=9*5。A最小=1374。
......
T(01)=3^2=9,
T(02)=24^2=576,
T(03)=63^2=3969,
T(04)=264^2=69696,
T(05)=1374^2=1887876,
T(06)=3114^2=9696996,
T(07)=8937^2=79869969,
T(08)=60663^2=3679999569,
T(09)=94863^2=8998988769,
......
详见31#。欢迎 Jack315参与!谢谢!
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2024-2-25 19:47:53 | 显示全部楼层
northwolves 发表于 2024-2-24 13:54
3        9        9
707106074079263583        499998999999788997978888999589997889        33/4
943345110232670883        889899996999 ...

487/59,513/62很好:与62#,63#吻合。再来几个?谢谢!
我们是闹着玩的。享受的是解题过程。还有:
数字串T(n): x*x各个数位上的数码和=9*T。
数字串A(n): x*x各个数位上的数码和=9(x+A)。
数字串A(n)是数字串T(n)的子集。
若能证明:数字串A(n)中 x 的高位数都是>sqrt{10}的,则62#的可信度又提了一截。
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2024-2-26 08:04:09 | 显示全部楼层
789的找到一个:$9949370777987917^2 =98989978877879888789778997998889$
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2024-2-26 08:04:54 | 显示全部楼层
oeis搜索了一下,只有两项:

A058471                Numbers k such that k^2 contains only digits {7,8,9}.       

3, 9949370777987917

点评

概率低但是基数大  发表于 2024-2-26 14:58
你给的链接里面表明10^25以内都只有这一个数,后面概率应该越来越低了  发表于 2024-2-26 14:37
猜测应该还有,我搜到10^22就搜到这一个  发表于 2024-2-26 13:50
我前面程序有个小错误,初始化部分存在小整数乘法溢出(10^6以内的整数求平方用int表示溢出了)。修正了以后的确有这个数,10^20以内只有这个  发表于 2024-2-26 13:11
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
您需要登录后才可以回帖 登录 | 欢迎注册

本版积分规则

小黑屋|手机版|数学研发网 ( 苏ICP备07505100号 )

GMT+8, 2024-11-14 14:31 , Processed in 0.052760 second(s), 23 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表