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

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

 火... [复制链接]
发表于 2023-11-8 15:10:44 | 显示全部楼层
6k+1: Table[b[n_] := If[n < 2, 1, b /@ Most@Divisors[n] // Total]; s = {b[(6 k - 1)/1], b[(6 k + 0)/3], b[(6 k + 1)/2]}; {s, Times @@ s}, {k, 1, 12}]

这个应该是错的
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2023-11-9 11:38:44 | 显示全部楼层
northwolves 发表于 2023-11-8 15:10
6k+1: Table[b[n_] := If[n < 2, 1, b /@ Most@Divisors[n] // Total]; s = {b[(6 k - 1)/1], b[(6 k + 0)/ ...

将4,5,6,…,n排成数列{a(k):k=1,2,3,4,5,…,n-3},使a(k)都是k的倍数,有几种排法?

把题目分成6k+1, 6k+2, 6k+3, 6k+4, 6k+4, 6k+5, 6k+6  7部分。

6k+1: Table[b[n_] := If[n < 3, 1, b /@ Most@Divisors[n] // Total]; s = {b[(6 k  - 1)/1], b[(6 k + 0)/3], b[(6 k + 1)/2]}; {s, Times @@ s}, {k, 1, 12}]
6k+2: Table[b[n_] := If[n < 3, 1, b /@ Most@Divisors[n] // Total]; s = {b[(6 k + 0)/3], b[(6 k + 1)/1], b[(6 k + 2)/2]}; {s, Times @@ s}, {k, 1, 12}]
{{{1, 1, 2}, 02}, {{2, 1, 1}, 02}, {{3, 1, 3}, 09}, {{4, 2, 1}, 08}, {{3, 1, 8}, 24}, {{8, 1, 1}, 08}, {{3, 1, 3}, 09}, {{8, 2, 2}, 32}, {{8, 3, 8}, 192}, {{8, 1, 1}, 8}, {{3, 1, 3}, 9}, {{20, 1, 1}, 20}}
6k+3: Table[b[n_] := If[n < 3, 1, b /@ Most@Divisors[n] // Total]; s = {b[(6 k + 1)/1], b[(6 k + 2)/2], b[(6 k + 3)/3]}; {s, Times @@ s}, {k, 1, 12}]
{{{1, 2, 1}, 02}, {{1, 1, 1}, 01}, {{1, 3, 1}, 03}, {{2, 1, 2}, 04}, {{1, 8, 1}, 08}, {{1, 1, 1}, 01}, {{1, 3, 3}, 09}, {{2, 2, 1}, 04}, {{3, 8, 1}, 24}, {{1, 1, 3}, 03}, {{1, 3, 1}, 03}, {{1, 1, 2}, 02}}
6k+4: Table[b[n_] := If[n < 2, 1, b /@ Most@Divisors[n] // Total]; s = {b[(6 k + 2)/1] - b[(6 k + 2)/2], b[(6 k + 3)/3], b[(6 k + 4)/2]}; {s, Times @@ s}, {k, 1, 12}]
{{{2, 1, 1}, 02}, {{2, 1, 4}, 08}, {{5, 1, 1}, 05}, {{2, 2, 3}, 12}, {{8, 1, 1}, 08}, {{2, 1, 8}, 16}, {{5, 3, 1}, 15}, {{6, 1, 3}, 18}, {{12, 1, 1}, 12}, {{2, 3, 16}, 96}, {{5, 1, 3}, 15}, {{2, 2, 3}, 12}}
6k+4: Table[b[n_] := If[n < 2, 1, b /@ Most@Divisors[n] // Total]; s = {b[(6 k + 2)/2], b[(6 k + 3)/3], b[(6 k + 4)/1] - b[(6 k + 4)/2]}; {s, Times @@ s}, {k, 1, 12}]
{{{2, 1, 2}, 04}, {{1, 1, 4}, 04}, {{3, 1, 2}, 06}, {{1, 2, 5}, 10}, {{8, 1, 2}, 16}, {{1, 1, 12}, 12}, {{3, 3, 2}, 18}, {{2, 1, 5},10}, {{8, 1, 2}, 16}, {{1, 3, 16}, 48}, {{3, 1, 10}, 30}, {{1, 2, 5}, 10}}
6k+5: Table[b[n_] := If[n < 2, 1, b /@ Most@Divisors[n] // Total]; s = {b[(6 k + 3)/3], b[(6 k + 4)/2], b[(6 k + 5)/1]}; {s, Times @@ s}, {k, 1, 12}]
{{{1, 1, 1}, 01}, {{1, 4, 1}, 04}, {{1, 1, 1}, 01}, {{2, 3, 1}, 06}, {{1, 1, 3}, 03}, {{1, 8, 1}, 08}, {{3, 1, 1}, 03}, {{1, 3, 1}, 03}, {{1, 1, 1}, 01}, {{3, 16, 3}, 144}, {{1, 3, 1}, 03}, {{2, 3, 3}, 18}}
6k+6: Table[b[n_] := If[n < 2, 1, b /@ Most@Divisors[n] // Total]; s = {b[(6 k + 4)/2], b[(6 k + 5)/1], b[(6 k + 6)/3]}; {s, Times @@ s}, {k, 1, 12}]
{{{1, 1, 2}, 02}, {{4, 1, 3}, 12}, {{1, 1, 4}, 04}, {{3, 1, 3}, 09}, {{1, 3, 8}, 24}, {{8, 1, 3}, 24}, {{1, 1, 8}, 08}, {{3, 1, 8}, 24}, {{1, 1, 8}, 08}, {{16, 3, 3}, 144}, {{3, 1, 20}, 60}, {{3, 3, 3}, 27}}

得到这样一串数(2个6k+4需合并): 6k+1无解(解数=0)
0, 2, 2, (2+4), 1, 2, 0, 2, 1, (8+4), 4, 12, 0, 9, 3, (5+6), 1, 4, 0, 8, 4, (12+10), 6, 9, 0, 24, 8, (8+16), 3, 24, 0, 8, 1, (16+12), 8, 24, 0, 9, 9, (15+18), 3, 8, 0, 32, 4, (18+10), 3, 24, 0, 192, 24, (12+16), 1, 8, ...

我还是找不到通项公式。
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2023-11-9 16:51:24 | 显示全部楼层
王守恩 发表于 2023-11-9 11:38
将4,5,6,…,n排成数列{a(k):k=1,2,3,4,5,…,n-3},使a(k)都是k的倍数,有几种排法?

把题目分成6k+1, 6k+2,  ...
  1. b[n_]:=If[n<2,1,Total[b/@Most@Divisors[n]]];Flatten@Table[{b[6 k+1]*b[3k+1]*{0,b[2k],b[2k+1]},b[2 k+1]*((b[6k+2]*b[3k+2]+b[3k+1]*(b[6k+4]-2b[3k+2]))),b[3 k+2]*b[6k+5]*{b[2k+1],b[2k+2]}},{k,20}]
复制代码


{0,2,2,6,1,2,0,2,1,12,4,12,0,9,3,11,1,4,0,8,4,22,6,9,0,24,8,24,3,24,0,8,1,28,8,24,0,9,9,33,3,8,0,32,4,28,3,24,0,192,24,28,1,8,0,8,3,144,144,144,0,9,3,45,3,60,0,20,2,22,18,27,0,60,80,272,4,8,0,24,3,28,8,104,0,117,9,11,3,48,0,32,6,252,24,24,0,24,24,84,3,26,0,78,3,284,20,60,0,27,27,33,9,60,0,40,2,11,12,156}

评分

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

查看全部评分

毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2023-11-9 20:39:07 | 显示全部楼层
northwolves 发表于 2023-11-8 10:50
{1,1,1,1,1,1,2,4,2,1,3,3,1,3,12,4,2,2,3,9,3,1,8,16,2,4,12,3,3,3,8,24,3,3,24,8}
  1. Table[b[n_] := If[n < 2, 1, Total[b /@ Most@Divisors[n]]]; {b[k]*b[2 k - 1],  b[k]*b[2 k + 1]}, {k, 18}] // Flatten
复制代码

{1, 1, 1, 1, 1, 1, 2, 4, 2, 1, 3, 3, 1, 3, 12, 4, 2, 2, 3, 9, 3, 1, 8, 16, 2, 4, 12, 3, 3, 3, 8, 24, 3, 3, 24, 8}
  1. Table[b[n_] := If[n < 2, 1, Total[b /@ Most@Divisors[n]]]; a[Floor[k/2]] {a[2 Floor[k/2] - 1]*Mod[k - 1, 2], a[2 Floor[k/2] + 1]*Mod[k - 1, 2]}, {k, 36}] // Flatten
复制代码

{0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 2, 4, 0, 0, 2, 1, 0, 0, 3, 3, 0, 0, 1, 3, 0, 0, 12, 4, 0, 0, 2, 2, 0, 0, 3, 9, 0, 0, 3, 1, 0, 0, 8, 16, 0, 0, 2, 4, 0, 0, 12, 3, 0, 0, 3, 3, 0, 0, 8, 24, 0, 0, 3, 3, 0, 0, 24, 8}

怎么把这些 “0” 去掉?
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2023-11-9 23:13:12 | 显示全部楼层
王守恩 发表于 2023-11-9 20:39
{1, 1, 1, 1, 1, 1, 2, 4, 2, 1, 3, 3, 1, 3, 12, 4, 2, 2, 3, 9, 3, 1, 8, 16, 2, 4, 12, 3, 3, 3, 8, 2 ...
  1. a=Table[b[n_]:=If[n<2,1,Total[b/@Most@Divisors[n]]];b[Floor[k/2]] {b[2 Floor[k/2]-1]*Mod[k-1,2],b[2 Floor[k/2]+1]*Mod[k-1,2]},{k,36}]//Flatten
  2. c=Cases[a,Except[0]]
  3. d=DeleteCases[a,0]
复制代码
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2023-11-10 10:31:28 | 显示全部楼层
本帖最后由 王守恩 于 2023-11-10 13:18 编辑

这样出来可以吗(依样画葫芦,没底气。01出来没问题, 02有问题?)?
  1. Table[b[n_]:=If[n<2,1,Total[b/@Most@Divisors[n]]];{b[Floor[n/2]]*b[2Floor[n/2]-Cos[n*Pi]]},{n,3,36}]//Flatten
  2. Table[b[0]=b[1]=1;b[n_]:=b[n]=Total[b/@Most@Divisors[n]];{b[Floor[n/2]]*b[2Floor[n/2]-Cos[n*Pi]]},{n,3,36}]//Flatten
复制代码

{1, 1, 1, 1, 1, 2, 4, 2, 1, 3, 3, 1, 3, 12, 4, 2, 2, 3, 9, 3, 1, 8, 16, 2, 4, 12, 3, 3, 3, 8, 24, 3, 3, 24}
将3,4,5,6,…,n排成数列{a(k):k=1,2,3,4,5,…,n-2},使a(k)都是k的倍数,有几种排法?
a(03)=b(01)*b(03)=1,{3},
a(04)=b(03)*b(02)=1,{3,4},
a(05)=b(02)*b(05)=1,{5,4,3},
a(06)=b(05)*b(03)=1,{5,6,3,4},
a(07)=b(03)*b(07)=1,{7,6,3,4,5},
a(08)=b(07)*b(04)=2,{7,4,3,8,5,6},{7,8,3,4,5,6},
a(09)=b(04)*b(09)=4,{3,4,8,9,5,6,7},{3,8,9,4,5,6,7},{9,4,3,8,5,6,7}{9,8,3,4,5,6,7},
a(10)=b(09)*b(05)=2,{3,10,9,4,5,6,7,8},{9,10,3,4,5,6,7,8},
a(11)=b(05)*b(11)=1,{11,10,3,4,5,6,7,8,9},
a(12)=b(11)*b(06)=3,{11,4,3,12,5,6,7,8,9,10},{11,6,3,4,5,12,7,8,9,10},{11,12,3,4,5,6,7,8,9,10},
a(13)=b(06)*b(13)=3,{13,4,3,12,5,6,7,8,9,10,11},{13,6,3,4,5,12,7,8,9,10,11},{13,12,3,4,5,6,7,8,9,10,11},
a(14)=b(13)*b(07)=1,{13,14,3,4,5,6,7,8,9,10,11,12},
......
b(n)是这样出来的:
  1. Table[b[n_]:=If[n<2,1,Total[b/@Most@Divisors[n]]];{b[n]},{n,1,36}]//Flatten
复制代码

{1, 1, 1, 2, 1, 3, 1, 4, 2, 3, 1, 8, 1, 3, 3, 8, 1, 8, 1, 8, 3, 3, 1, 20, 2, 3, 4, 8, 1, 13, 1, 16, 3, 3, 3, 26, 1, 3, 3, 20, 1, 13,
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2023-11-10 13:48:51 | 显示全部楼层
  1. b[n_]:=If[n<2,1,Total[b/@Most@Divisors[n]]];Table[b[2Ceiling[n/2]-1]*b[Floor[n/2]],{n,3,36}]
  2. Table[b[(2n-1-(-1)^n)/2]*b[(2n-1+(-1)^n)/4],{n,3,36}]
复制代码


{1, 1, 1, 1, 1, 2, 4, 2, 1, 3, 3, 1, 3, 12, 4, 2, 2, 3, 9, 3, 1, 8, 16, 2, 4, 12, 3, 3, 3, 8, 24, 3, 3, 24}
{1, 1, 1, 1, 1, 2, 4, 2, 1, 3, 3, 1, 3, 12, 4, 2, 2, 3, 9, 3, 1, 8, 16, 2, 4, 12, 3, 3, 3, 8, 24, 3, 3, 24}
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2023-11-11 12:50:30 | 显示全部楼层
northwolves 发表于 2023-11-9 16:51
{0,2,2,6,1,2,0,2,1,12,4,12,0,9,3,11,1,4,0,8,4,22,6,9,0,24,8,24,3,24,0,8,1,28,8,24,0,9,9,33,3,8,0 ...

将5,6,7,…,n排成数列{a(k):k=1,2,3,4,5,…,n-4},使a(k)都是k的倍数,有几种排法?
  1. Flatten@Table[ b[n_] := If[n < 2, 1, b /@ Most@Divisors[n]] // Total;
  2. {b[(12k+0)/4]*b[(12k+1)/1]*b[(12k+2)/2]*b[(12 k+3)/3],   b[(12k+1)/1]*b[(12k+2)/2]*b[(12k+3)/3]*b[(12k+4)/4],  b[(12k+2)/2]*b[(12k+3)/3]*b[(12k+4)/4]*b[(12k+5)/1],
  3. b[(12k+3)/3]*b[(12k+4)/4]*b[(12k+5)/1]*b[(12k+6)/2], 0, 0, b[(12k+6)/2]*b[(12k+7)/1]*b[(12k+8)/4]*b[(12k+9)/3], b[(12k+7)/1]*b[(12k+8)/4]*b[(12k+9)/3]*b[(12k+10)/2],
  4. b[(12k+8)/4]*b[(12k+9)/3]*b[(12k+10)/2]*b[(12k+11)/1], b[(12k+9)/3]*b[(12k+10)/2]*b[(12k+11)/1]*b[(12k+12)/4],  0,  0}, {k, 0, 9}]
复制代码

{1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 2, 2, 4, 0, 0, 2, 1, 1, 3, 0, 0, 12, 4, 2, 6, 0, 0, 12, 4, 12, 6, 0, 0, 2, 3, 3, 9, 0, 0, 9, 3, 3, 24, 0, 0, 32, 4, 2, 4, 0, 0, 36, 9, 3, 3, 0, 0, 9, 24, 72, 216, 0, 0,
3, 3, 3, 24, 0, 0, 16, 2, 6, 18, 0, 0, 96, 32, 32, 12, 0, 0, 9, 9, 3, 24, 0, 0, 24, 3, 3, 60, 0, 0, 120, 12, 12, 18, 0, 0, 27, 9, 9, 12, 0, 0, 12, 24, 24, 24, 0, 0, 27, 9, 9, 117, 0, 0}
  1. Flatten@Table[b[n_] := If[n < 2, 1, b /@ Most@Divisors[n]] // Total;
  2. {b[12k+1]*b[6k+1]*b[4k+1]{b[3k+0],b[3k+1]},b[12k+5]*b[4 k+1]*b[3k+1]{b[6k+1],b[6k+3]},0,0,b[12k+7]*b[4k+3]*b[3k+2]{b[6k+3],b[6k+5]},b[12k+11]*b[6k+5]*b[4k+3]{b[3k+2],b[3k+3]},0,0},{k,0,9}]
复制代码

{1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 2, 2, 4, 0, 0, 2, 1, 1, 3, 0, 0, 12, 4, 2, 6, 0, 0, 12, 4, 12, 6, 0, 0, 2, 3, 3, 9, 0, 0, 9, 3, 3, 24, 0, 0, 32, 4, 2, 4, 0, 0, 36, 9, 3, 3, 0, 0, 9, 24, 72, 216, 0, 0,
3, 3, 3, 24, 0, 0, 16, 2, 6, 18, 0, 0, 96, 32, 32, 12, 0, 0, 9, 9, 3, 24, 0, 0, 24, 3, 3, 60, 0, 0, 120, 12, 12, 18, 0, 0, 27, 9, 9, 12, 0, 0, 12, 24, 24, 24, 0, 0, 27, 9, 9, 117, 0, 0}
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2023-11-16 09:40:18 | 显示全部楼层
用 1,2,3,4,5,6,7,8,9 这 9 个数码:  数码1最多用1次, 数码2最多用2次, 数码3最多用3次,
数码4最多用4次, 数码5最多用5次, 数码6最多用6次,数码7最多用7次, 数码8最多用8次,
数码9最多用9次, 这样的n(n=1,2,3,4,5,6,7,8,9,......)位数(十进制)有几个?
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2023-11-16 18:42:40 | 显示全部楼层
  1. Table[Length@
  2.   Permutations[Table[Floor[Sqrt[2 n] + 1/2], {n, 45}], {n}], {n, 9}]
复制代码


{9, 80, 703, 6110, 52535, 446914, 3761642, 31325180, 258068893}

评分

参与人数 1威望 +9 金币 +9 贡献 +9 经验 +9 鲜花 +9 收起 理由
王守恩 + 9 + 9 + 9 + 9 + 9 你应该有一个别人不知道的秘诀!.

查看全部评分

毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
您需要登录后才可以回帖 登录 | 欢迎注册

本版积分规则

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

GMT+8, 2024-11-24 08:22 , Processed in 0.028602 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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