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

[求助] 求{1, 2, ..., 100}没有等和对的最大子集

[复制链接]
 楼主| 发表于 7 天前 | 显示全部楼层
northwolves 发表于 2025-7-21 23:37
Table 改为 Do 即可:

搬运一下——用了4个小时。
Do[K={0, a1, a2, a3, a4, a5, a6, a7, a8, 45};S=Total/@Subsets[K,{2}];If[Length[S]==Length[Union[S]],Print[{Length[S],K}]],{a1, 37},{a2, a1+1, 38},{a3, a2+1, 39},{a4, a3+1, 40},{a5, a4+1, 41},{a6, a5+1, 42},{a7, a6+1, 43},{a8, a7+1, 44}]
{45,{0,1,7,10,13,21,26,41,43,45}}
{45,{0,2,4,19,24,32,35,38,44,45}}
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 前天 18:22 | 显示全部楼层
A345731——Additive bases: a(n) is the least integer such that there is an n-element set of integers between 0 and a(n), the sums of pairs (of distinct elements) of which are distinct.
A345731——1, 2, 4, 7, 12, 18, 24, 34, 45, 57, 71, 86, 105, 126, 150, 171,——Table of n, a(n) for n=2..17.——{0, 1, 2, 3, ..., a(n)}没有等和对的最大子集。

a(1)=0,  0,
a(2)=1,  0, 1,
a(3)=2,  0, 1, 2,
a(4)=4,  0, 2, 3, 4,
a(5)=7,  0, 3, 5, 6, 7,
a(6)=12,  0, 1, 2, 6, 9, 12,
a(7)=18,  0, 1, 2, 4, 8, 13, 18,
a(8)=24,  0, 1, 2, 4, 8, 14, 19, 24,
a(9)=34,  0, 1, 2, 4, 8, 15, 24, 29, 34,
a(10)=45,  0, 1, 7, 10, 13, 21, 26, 41, 43, 45,
a(11)=57,  0, 1, 5, 9, 17, 31, 33, 44, 51, 54, 57,
a(12)=71,  0, 1, 2,  7, 12 22, 37, 40, 54, 63, 67, 71,
a(13)=86,  0, 1, 11, 17, 21, 34, 42, 57, 60, 72, 79, 84, 86,——72,79,86可以成等差数列。
a(14)=105,  0, 1, 6, 14, 27, 44 54 66, 69, 85, 94, 101, 103, 105,
a(15)=126,  0, 8, 13, 16, 19, 31, 46, 76, 83, 90, 100, 104, 124, 125, 126,
a(16)=148,  0, 3, 5, 6, 32, 49, 59, 68, 93, 106, 118, 126, 130, 134, 141, 148,
a(17)=171,
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
您需要登录后才可以回帖 登录 | 欢迎注册

本版积分规则

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

GMT+8, 2025-8-2 03:29 , Processed in 0.030821 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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