十进升序数总和:FromDigits/@Subsets@Range//Total 本帖最后由 王守恩 于 2020-5-13 20:28 编辑
hujunhua 发表于 2020-5-12 20:59
十进降序数总和:FromDigits/@Subsets@Range//Total
十进升序数总和:FromDigits/@Subsets@Range[ ...
这样也可以(画蛇添足)
n 进降序数总和:
\(\D\sum_{k=1}^n(n-k)*2^{k-1}*11^{n-k}\)
{0, 11, 264, 4521, 67606, 940467, 12510300, 161430797, 2037732642, 25296994503}
n 进升序数总和:
\(\D\sum_{k=0}^{n-2}(k+1)*2^{k}*11^{n-k-2}\)
{0, 1, 15, 177, 1979, 21849, 240531, 2646289, 29110203, 320214537}
数都是同一串数:4楼是按 n 进相加,12楼是按十进相加。 本帖最后由 zeroieme 于 2020-5-13 16:02 编辑
你们没搞清楚11的来源。
正反序都是那串数码排序后每个数字取或不取的问题。
以完全不取的空串也视为合规数字串,作为起点,逐步追加数字。
空串和为0
前步和为\(S_{i}\),有\(2^i\)个数字串。不追加的本步数字\(a_i\)那部分就仍有\(2^i\)个数字串,和为\(S_{i}\);而追加的本步数字那部分就是上步数字串左移一位(就是乘上进制基数n)再加上本步数数字,共\(2^i\)个。所以\(S_{i+1}=S_{i}*(1+n)+2^i*a_i\) 本帖最后由 王守恩 于 2020-5-23 19:26 编辑
hujunhua 发表于 2020-5-12 20:59
十进降序数总和:FromDigits/@Subsets@Range//Total
十进升序数总和:FromDigits/@Subsets@Range[ ...
谢谢 hujunhua!看来我们的差距真是得用 “光年” 来计算(zeroieme说的)。
神奇的算式!前几天我以为只能出来算式 1,今天糊弄一下出来算式 2,
算式 1,十进降序数总和:FromDigits/@Subsets@Range//Total
25296994503
算式 2,十进降序数总和:FromDigits/@Subsets@Range//Table
{0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 98, 97, 96, 95, 94, 93, 92, 91, 90, \
87, 86, 85, 84, 83, 82, 81, 80, 76, 75, 74, 73, 72, 71, 70, 65, 64, \
63, 62, 61, 60, 54, 53, 52, 51, 50, 43, 42, 41, 40, 32, 31, 30, 21, \
20, 10, 987, 986, 985, 984, 983, 982, 981, 980, 976, 975, 974, 973, \
972, 971, 970, 965, 964, 963, 962, 961, 960, 954, 953, 952, 951, 950, \
943, 942, 941, 940, 932, 931, 930, 921, 920, 910, 876, 875, 874, 873, \
872, 871, 870, 865, 864, 863, 862, 861, 860, 854, 853, 852, 851, 850, \
843, 842, 841, 840, 832, 831, 830, 821, 820, 810, 765, 764, 763, 762, \
761, 760, 754, 753, 752, 751, 750, 743, 742, 741, 740, 732, 731, 730, \
721, 720, 710, 654, 653, 652, 651, 650, 643, 642, 641, 640, 632, 631, \
630, 621, 620, 610, 543, 542, 541, 540, 532, 531, 530, 521, 520, 510, \
432, 431, 430, 421, 420, 410, 321, 320, 310, 210, 9876, 9875, 9874, \
9873, 9872, 9871, 9870, 9865, 9864, 9863, 9862, 9861, 9860, 9854, \
9853, 9852, 9851, 9850, 9843, 9842, 9841, 9840, 9832, 9831, 9830, \
9821, 9820, 9810, 9765, 9764, 9763, 9762, 9761, 9760, 9754, 9753, \
9752, 9751, 9750, 9743, 9742, 9741, 9740, 9732, 9731, 9730, 9721, \
9720, 9710, 9654, 9653, 9652, 9651, 9650, 9643, 9642, 9641, 9640, \
9632, 9631, 9630, 9621, 9620, 9610, 9543, 9542, 9541, 9540, 9532, \
9531, 9530, 9521, 9520, 9510, 9432, 9431, 9430, 9421, 9420, 9410, \
9321, 9320, 9310, 9210, 8765, 8764, 8763, 8762, 8761, 8760, 8754, \
8753, 8752, 8751, 8750, 8743, 8742, 8741, 8740, 8732, 8731, 8730, \
8721, 8720, 8710, 8654, 8653, 8652, 8651, 8650, 8643, 8642, 8641, \
8640, 8632, 8631, 8630, 8621, 8620, 8610, 8543, 8542, 8541, 8540, \
8532, 8531, 8530, 8521, 8520, 8510, 8432, 8431, 8430, 8421, 8420, \
8410, 8321, 8320, 8310, 8210, 7654, 7653, 7652, 7651, 7650, 7643, \
7642, 7641, 7640, 7632, 7631, 7630, 7621, 7620, 7610, 7543, 7542, \
7541, 7540, 7532, 7531, 7530, 7521, 7520, 7510, 7432, 7431, 7430, \
7421, 7420, 7410, 7321, 7320, 7310, 7210, 6543, 6542, 6541, 6540, \
6532, 6531, 6530, 6521, 6520, 6510, 6432, 6431, 6430, 6421, 6420, \
6410, 6321, 6320, 6310, 6210, 5432, 5431, 5430, 5421, 5420, 5410, \
5321, 5320, 5310, 5210, 4321, 4320, 4310, 4210, 3210, 98765, 98764, \
98763, 98762, 98761, 98760, 98754, 98753, 98752, 98751, 98750, 98743, \
98742, 98741, 98740, 98732, 98731, 98730, 98721, 98720, 98710, 98654, \
98653, 98652, 98651, 98650, 98643, 98642, 98641, 98640, 98632, 98631, \
98630, 98621, 98620, 98610, 98543, 98542, 98541, 98540, 98532, 98531, \
98530, 98521, 98520, 98510, 98432, 98431, 98430, 98421, 98420, 98410, \
98321, 98320, 98310, 98210, 97654, 97653, 97652, 97651, 97650, 97643, \
97642, 97641, 97640, 97632, 97631, 97630, 97621, 97620, 97610, 97543, \
97542, 97541, 97540, 97532, 97531, 97530, 97521, 97520, 97510, 97432, \
97431, 97430, 97421, 97420, 97410, 97321, 97320, 97310, 97210, 96543, \
96542, 96541, 96540, 96532, 96531, 96530, 96521, 96520, 96510, 96432, \
96431, 96430, 96421, 96420, 96410, 96321, 96320, 96310, 96210, 95432, \
95431, 95430, 95421, 95420, 95410, 95321, 95320, 95310, 95210, 94321, \
94320, 94310, 94210, 93210, 87654, 87653, 87652, 87651, 87650, 87643, \
87642, 87641, 87640, 87632, 87631, 87630, 87621, 87620, 87610, 87543, \
87542, 87541, 87540, 87532, 87531, 87530, 87521, 87520, 87510, 87432, \
87431, 87430, 87421, 87420, 87410, 87321, 87320, 87310, 87210, 86543, \
86542, 86541, 86540, 86532, 86531, 86530, 86521, 86520, 86510, 86432, \
86431, 86430, 86421, 86420, 86410, 86321, 86320, 86310, 86210, 85432, \
85431, 85430, 85421, 85420, 85410, 85321, 85320, 85310, 85210, 84321, \
84320, 84310, 84210, 83210, 76543, 76542, 76541, 76540, 76532, 76531, \
76530, 76521, 76520, 76510, 76432, 76431, 76430, 76421, 76420, 76410, \
76321, 76320, 76310, 76210, 75432, 75431, 75430, 75421, 75420, 75410, \
75321, 75320, 75310, 75210, 74321, 74320, 74310, 74210, 73210, 65432, \
65431, 65430, 65421, 65420, 65410, 65321, 65320, 65310, 65210, 64321, \
64320, 64310, 64210, 63210, 54321, 54320, 54310, 54210, 53210, 43210, \
987654, 987653, 987652, 987651, 987650, 987643, 987642, 987641, \
987640, 987632, 987631, 987630, 987621, 987620, 987610, 987543, \
987542, 987541, 987540, 987532, 987531, 987530, 987521, 987520, \
987510, 987432, 987431, 987430, 987421, 987420, 987410, 987321, \
987320, 987310, 987210, 986543, 986542, 986541, 986540, 986532, \
986531, 986530, 986521, 986520, 986510, 986432, 986431, 986430, \
986421, 986420, 986410, 986321, 986320, 986310, 986210, 985432, \
985431, 985430, 985421, 985420, 985410, 985321, 985320, 985310, \
985210, 984321, 984320, 984310, 984210, 983210, 976543, 976542, \
976541, 976540, 976532, 976531, 976530, 976521, 976520, 976510, \
976432, 976431, 976430, 976421, 976420, 976410, 976321, 976320, \
976310, 976210, 975432, 975431, 975430, 975421, 975420, 975410, \
975321, 975320, 975310, 975210, 974321, 974320, 974310, 974210, \
973210, 965432, 965431, 965430, 965421, 965420, 965410, 965321, \
965320, 965310, 965210, 964321, 964320, 964310, 964210, 963210, \
954321, 954320, 954310, 954210, 953210, 943210, 876543, 876542, \
876541, 876540, 876532, 876531, 876530, 876521, 876520, 876510, \
876432, 876431, 876430, 876421, 876420, 876410, 876321, 876320, \
876310, 876210, 875432, 875431, 875430, 875421, 875420, 875410, \
875321, 875320, 875310, 875210, 874321, 874320, 874310, 874210, \
873210, 865432, 865431, 865430, 865421, 865420, 865410, 865321, \
865320, 865310, 865210, 864321, 864320, 864310, 864210, 863210, \
854321, 854320, 854310, 854210, 853210, 843210, 765432, 765431, \
765430, 765421, 765420, 765410, 765321, 765320, 765310, 765210, \
764321, 764320, 764310, 764210, 763210, 754321, 754320, 754310, \
754210, 753210, 743210, 654321, 654320, 654310, 654210, 653210, \
643210, 543210, 9876543, 9876542, 9876541, 9876540, 9876532, 9876531, \
9876530, 9876521, 9876520, 9876510, 9876432, 9876431, 9876430, \
9876421, 9876420, 9876410, 9876321, 9876320, 9876310, 9876210, \
9875432, 9875431, 9875430, 9875421, 9875420, 9875410, 9875321, \
9875320, 9875310, 9875210, 9874321, 9874320, 9874310, 9874210, \
9873210, 9865432, 9865431, 9865430, 9865421, 9865420, 9865410, \
9865321, 9865320, 9865310, 9865210, 9864321, 9864320, 9864310, \
9864210, 9863210, 9854321, 9854320, 9854310, 9854210, 9853210, \
9843210, 9765432, 9765431, 9765430, 9765421, 9765420, 9765410, \
9765321, 9765320, 9765310, 9765210, 9764321, 9764320, 9764310, \
9764210, 9763210, 9754321, 9754320, 9754310, 9754210, 9753210, \
9743210, 9654321, 9654320, 9654310, 9654210, 9653210, 9643210, \
9543210, 8765432, 8765431, 8765430, 8765421, 8765420, 8765410, \
8765321, 8765320, 8765310, 8765210, 8764321, 8764320, 8764310, \
8764210, 8763210, 8754321, 8754320, 8754310, 8754210, 8753210, \
8743210, 8654321, 8654320, 8654310, 8654210, 8653210, 8643210, \
8543210, 7654321, 7654320, 7654310, 7654210, 7653210, 7643210, \
7543210, 6543210, 98765432, 98765431, 98765430, 98765421, 98765420, \
98765410, 98765321, 98765320, 98765310, 98765210, 98764321, 98764320, \
98764310, 98764210, 98763210, 98754321, 98754320, 98754310, 98754210, \
98753210, 98743210, 98654321, 98654320, 98654310, 98654210, 98653210, \
98643210, 98543210, 97654321, 97654320, 97654310, 97654210, 97653210, \
97643210, 97543210, 96543210, 87654321, 87654320, 87654310, 87654210, \
87653210, 87643210, 87543210, 86543210, 76543210, 987654321, \
987654320, 987654310, 987654210, 987653210, 987643210, 987543210, \
986543210, 976543210, 876543210, 9876543210} 王守恩 发表于 2020-5-23 19:25
谢谢 hujunhua!看来我们的差距真是得用 “光年” 来计算(zeroieme说的)。
神奇的算式!前几天我以为 ...
15楼这串数,按从小到大排列,可以有这样一个按钮吗? hujunhua 发表于 2020-5-12 20:59
十进降序数总和:FromDigits/@Subsets@Range//Total
十进升序数总和:FromDigits/@Subsets@Range[ ...
谢谢神奇的 hujunhua!看来我们的差距真是得用 “光年” 来计算(zeroieme说的)。
谢谢神奇的算式!回头再来看看能不能挖点宝出来。谢谢 hujunhua!
页:
1
[2]