[seqfan] Re: Possible interesting sequence

Maximilian Hasler maximilian.hasler at gmail.com
Mon Jun 4 03:36:55 CEST 2012


On Sat, Jun 2, 2012 at 10:30 PM, David Wilson wrote:
>
> For n >= 3, let S be a set of n positive integers of minimal sum
> whose reciprocals add to 1.
>
> Let a(n) be the sum of S.


I get
a = 1,0,11,24,38,50, ...
where a(1)=1 refers to S={1} and a(2)=0 means that there's no such set for n=2.

The corresponding decompositions are:
 [[2,3,6]]
 [[2, 4, 6, 12]]  // among 6 possibilities
 [[3, 4, 5, 6, 20]]  // among 72
 [[3, 4, 6, 10, 12, 15]] // among 2320

While I get a(6) in < 0.1 sec, my code seems unable to compute a(7).
However, a tweaked code gives (again in 0.1 sec...)
a(7) <= 128 (for S=[3, 5, 6, 8, 10, 16, 80]).

Maximilian


a(n/*#terms to use*/,s=1/*sum to achieve*/,m=2/*minimum*/)={
n==1 & return((numerator(s)==1 & 1 >= m*s || s==1)/s);
/* s=1/m + ... < n/m, thus if s>=n/m, not possible */
s*m < n || return; /* useless? */
sum( k=m,m+n-1,1/k ) >= s || return; my(M=0);
for(x=max(m,1\s+1),n\s, (t=a(n-1, s-1/x, x+1)) | next;
M & M<=x+t & next; M=x+t;
sum(k=x+1,x+n,k)>=M & break /* useless? */); M}



More information about the SeqFan mailing list