帐号 自动登录 找回密码 密码 欢迎注册
 搜索

# [讨论] 自缚数

### 马上注册，结交更多好友，享用更多功能，让你轻松玩转社区。

x

1)、求10^19内的所有自缚数（ B无范围限制 )。
2)、你可以求到多大的范围？$10^35$? $10^40$? 或者更大？

 这个能通过缩小范围得到

 B = 1 仅有1 B = 2 2^9 = 512 最多4位数字

 B = 2，无解 Prelude Control.Monad> let ba=[0..9] Prelude Control.Monad> let aaa=[(a,b,c,d) | a<-[1..9],b<-ba,c<-ba,d<-ba,2^a+2^b+ 2^c+2^d==1000*a + 100*b +10*c+d] Prelude Control.Monad> aaa [] Prelude Control.Monad> let aaa=[(a,b,c) | a<-[1..9],b<-ba,c<-ba,2^a+2^b+2^c==100 *a+10*b+c] Prelude Control.Monad> aaa [] Prelude Control.Monad> let aaa=[(a,b) | a<-[1..9],b<-ba,2^a+2^b==10*a+b] Prelude Control.Monad> aaa [] Prelude Control.Monad> let aaa=[(a) | a<-[1..9],2^a==a] Prelude Control.Monad> aaa []

 B = 3 12

 对任何 B 其最大范围是 n * B^9 <= 10^n 得到的n为最大可能位数 而n * B^9为最大可能数

 B = 4， 最大1835008

 小于10000的测试结果 B = 1, n = 1 B = 9, n = 10 B = 3, n = 12 B = 98, n = 100 B = 50, n = 101 B = 37, n = 111 B = 997, n = 1000 B = 504, n = 1010 B = 8, n = 1033 B = 549, n = 1100 B = 32, n = 2112 B = 4, n = 4624

 5位的 B = 100, n = 20102 B = 2775, n = 11101 B = 4999, n = 10001 B = 9996, n = 10000

 六位 B = 4, n = 595968 以下数对，左面是B，右面是对应数字 (200,120202),(316,101121),(346,121101),(20222,101111),(22022,110111), (22202,111011),(22220,111101),(25277,101110),(27527,110110), (27752,111010)],[(33336,100011)],[(33366,100101),(33369,100110), (33666,101001),(33669,101010),(33699,101100),(36666,110001), (36669,110010),(36699,110100),(36999,111000),(50003,100010), (50048,100100),(50498,101000),(54998,110000),(99995,100000)

 您需要登录后才可以回帖 登录 | 欢迎注册 本版积分规则 回帖后跳转到最后一页

GMT+8, 2019-12-11 17:00 , Processed in 0.060388 second(s), 16 queries .