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

# [原创] 数字串的通项公式

火... [复制链接]
楼主| 发表于 2023-9-25 18:46:50 | 显示全部楼层
 R(n)表示正整数n除以2,3,4,5,6,7,8,9,10的余数之和, 若要求R(n)=R(n-1),  则n是这样一串数: 14, 98, 154, 182, 238, 266, 322, 406, 434, 518, 574, 602, 658, 686, 742, 826, 854, 938, 994, 1022, 1078, 1106, 1162, 1246, 1274, 1358, 1414, 1442, 1498, 1526, 1582, 1666, 1694, 1778, 1834, 1862, 1918, 1946, 2002, 2086, 2114, 2198, 2254, 2282, 2338, 2366, 2422, 2506, 2534, 2618, 2674, 2702, 2758, 2786, 2842, 2926, 2954, 3038, 3094, 3122, ...... Table[14(4n-3-2Floor[(n-1)/8]+(1+(-1)^Floor[(n-2)/2])(-1)^Floor[(n-2)/4]),{n,1,60}]复制代码

### 点评

 王守恩 发表于 2023-9-25 18:46 R(n)表示正整数n除以2,3,4,5,6,7,8,9,10的余数之和, 若要求R(n)=R(n-1),  则n是这样一串数: 14, 98, 154, 1 ...Select[Range@4000,Sum[Mod[#,k]-Mod[#-1,k],{k,10}]==0&]复制代码

### 评分

楼主| 发表于 2023-9-26 16:20:58 | 显示全部楼层
 northwolves 发表于 2023-9-25 19:54 太好了！不能就这样溜走！！ 1,R(n)表示正整数n除以2,3,4,5,6,7,8,9,10的余数之和, 若要求R(n)=R(n-1),  则n是这样一串数: Select[Range@4000,Sum[Mod[#,k]-Mod[#-1,k],{k,10}]==0&] 2,R(n)表示正整数n除以2,3,4,5,6,7,8,9,10的余数之和, 若要求R(n)=R(n-a),  则n是这样一串数: Select[Range@4000,Sum[Mod[#,k]-Mod[#-a,k],{k,10}]==0&] 3,R(n)表示正整数n除以2,3,4,5,6,7,8,9,10的余数之和, 若要求R(n)=R(n-1)+b,  则n是这样一串数: Select[Range@4000,Sum[Mod[#,k]-Mod[#-1,k],{k,10}]==b&] 4,R(n)表示正整数n除以c,(c+1),...,(d-1),d的余数之和, 若要求R(n)=R(n-1),  则n是这样一串数: Select[Range@4000,Sum[Mod[#,k]-Mod[#-1,k],{k,c,d}]==0&] ...... 这样的通项也可以有！ 1,5,11,13,17,19,23,25,29,31,37,41,43,47,53,55,59,61,65,67,71,73,79,83,85,89, 95, 97, 101,103,107,109,113,115,121,125,127,131,137,139,143,145,149,151,155,157,163,167,169,173,179,181,185,187,191,193,197,199,205,209,211,215,221,223,... 1,7,11,13,17,19,23,29,31,37,41,43,47,49,53,59,61,67,71,73,77,79,83,89,91,97,101,103,107,109,113,119,121,127,131,133,137,139,143,149,151,157,161,163,167,169,173,179,181,187,191,193,197,199,203,209,211,217,221,223,227,229,233,239,... ......

楼主| 发表于 2023-9-28 16:48:19 | 显示全部楼层
 1:|pi-3/1|=0.141692 2:|pi-16/5|=0.0584073 3:|pi-22/7|=0.00126448 4:|pi-201/64|=0.000967653 5:|pi-333/106|=0.0000832196 6:|pi-355/113|=2.66764*10^-7 7:|pi-355/113|=2.66764*10^-7 8:|pi-75948/24175|= 9.92981*10^-8 9:|pi-100798/32085|=9.05184*10^-9 ...... 我们专门把分母拉出来,是这样一串数: 1, 5, 7, 64, 106, 113, 113, 24175, 32085, 33102, 99532, 265381, 1360120, 1725033, 18610450, 25510582, 78256779, 340262731,811528438, .......... 这串数可是在OEIS找不到的。可有好的通项公式？谢谢！

 王守恩 发表于 2023-9-28 16:48 1:|pi-3/1|=0.141692 2:|pi-16/5|=0.0584073 3:|pi-22/7|=0.00126448p[n_]:=Min@Denominator@Select[Table[Rationalize[Pi+k*10^(-n-1),10^-n],{k,-5,5}],Abs[Pi-#]<10^-n&];Table[p[n],{n,0,40}]复制代码 {1,5,7,64,106,113,113,24175,32085,33102,99532,265381,1360120,1725033,18610450,25510582,78256779,340262731,811528438,1963319607,6701487259,6701487259,413528890451,554260122890,1142027682075,2851718461558,2851718461558,41633749241295,91822653867264,136308121570117,1543874804974140,1952799169684491,9627687726852338,21208174623389167,115668560843798173,136876735467187340,842468587426513207,842468587426513207,49842523393631466553,79328923953559428798,84383735478118508040}

### 评分

楼主| 发表于 2023-9-29 12:34:08 | 显示全部楼层
 northwolves 发表于 2023-9-28 19:46 {1,5,7,64,106,113,113,24175,32085,33102,99532,265381,1360120,1725033,18610450,25510582,78256779, ... 我们这串数(pi的误差分数)还是比A002486(pi的连分数)误差分布均匀些。 1, 5, 7, 64, 106, 113, 113, 24175, 32085, 33102, 99532, 265381, 1360120, 1725033, 18610450, 25510582, 78256779, 340262731, 811528438, 1963319607, 6701487259, 6701487259, 413528890451, 554260122890, 1142027682075,...... 1, 7, 106, 113, 33102, 33215, 66317, 99532, 265381, 364913, 1360120, 1725033, 25510582, 52746197, 78256779, 131002976, 340262731, 811528438, 1963319607, 4738167652, 6701487259, 567663097408, 1142027682075,......

### 点评

楼主| 发表于 2023-9-30 06:42:27 | 显示全部楼层
 再来一串! OEIS没有的。e 的误差分数比 e 的连分数(A007677)误差分布均匀些。 Table[Min@Denominator@Select[Table[Rationalize[E+k/10^(n+1),10^-n],{k,-5,5}],Abs[E-#]<10^-n&],{n,0,40}]复制代码 1, 3, 7, 32, 71, 394, 1001, 5541, 8544, 18089, 154257, 398959, 398959, 4597073, 10391023, 10391023, 140478290, 312129649, 312129649, 4843205071, 10622799089, 10622799089, 175432249793, 403978495031, 403978495031, ...... 1, 3, 4, 7, 32, 39, 71, 465, 536, 1001, 8544, 9545, 18089, 190435, 208524, 398959, 4996032, 5394991, 10391023, 150869313, 161260336, 312129649, 5155334720, 5467464369, 10622799089, 196677847971, 207300647060, 403978495031, ...... 这两者摆在一起，连分数还是有缺陷的：连分数有重叠，有空白。误差分数就没有这些缺陷。

### 点评

楼主| 发表于 2023-10-4 17:00:38 | 显示全部楼层
 A033485    a(n)=a(n-1)+a(floor(n/2)), a(1)=1. {1, 2, 3, 5, 7, 10, 13, 18, 23, 30, 37, 47, 57, 70, 83, 101, 119, 142, 165, 195, 225, 262, 299, 346, 393, 450, ... a[1]=1;a[n_]:=a[2n]=Sum[a[k],{k,1,n}];Table[a[2n],{n,1,26}]复制代码 A033485好像不是这样的。还可以有其他表达方式吗？

 王守恩 发表于 2023-10-4 17:00 A033485    a(n)=a(n-1)+a(floor(n/2)), a(1)=1. {1, 2, 3, 5, 7, 10, 13, 18, 23, 30, 37, 47, 57, 70, 83 ...a[n_] := If[n < 4, n, a[Floor[n/2]] + a[n - 1]]; Table[a[n], {n, 36}]复制代码 {1,2,3,5,7,10,13,18,23,30,37,47,57,70,83,101,119,142,165,195,225,262,299,346,393,450,507,577,647,730,813,914,1015,1134,1253,1395}

### 评分

楼主| 发表于 2023-10-4 20:51:31 | 显示全部楼层
 northwolves 发表于 2023-10-4 18:04 {1,2,3,5,7,10,13,18,23,30,37,47,57,70,83,101,119,142,165,195,225,262,299,346,393,450,507,577,647 ... 第2串:{1,2,3,5,7,10,13,18,23,30,37,47,57,70,83,101,119,142,165,195,225,262,299,346,393,450,507,577,647,730,813,914,1015,1134,1253,1395, a[n_]:=If[n<2,n,a[Floor[(n+0)/2]]+a[n-1]];Table[a[n],{n,36}]复制代码 第3串:a(1)=1, a(n) = a(n-1) + a(floor((n+1)/3))A089649 a[n_]:=If[n<2,n,a[Floor[(n+1)/3]]+a[n-1]];Table[a[n],{n,36}]复制代码 第4串:a(1)=1, a(n) = a(n-1) + a(floor((n+1)/4))A089651 a[n_]:=If[n<2,n,a[Floor[(n+2)/4]]+a[n-1]];Table[a[n],{n,36}]复制代码 第5串:a(1)=1, a(n) = a(n-1) + a(floor((n+1)/5)) a[n_]:=If[n<2,n,a[Floor[n+3)/5]]+a[n-1]];Table[a[n],{n,36}]复制代码 第6串:a(1)=1, a(n) = a(n-1) + a(floor((n+1)/6)) a[n_]:=If[n<2,n,a[Floor[(n+4)/6]]+a[n-1]];Table[a[n],{n,36}]复制代码 第7串:a(1)=1, a(n) = a(n-1) + a(floor((n+1)/7)) a[n_]:=If[n<2,n,a[Floor[(n+5)/7]]+a[n-1]];Table[a[n],{n,36}]复制代码   OEISH还没有第5,6,7,...串数。

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

GMT+8, 2024-9-15 08:18 , Processed in 0.025761 second(s), 16 queries .