[seqfan] Re: Egyptian Fractions
Richard Mathar
mathar at strw.leidenuniv.nl
Wed May 5 17:40:20 CEST 2010
An attempt to address http://list.seqfan.eu/pipermail/seqfan/2010-May/004576.html :
For n =2 I get
a(n=2,m=1)=1 (namely 1/2=1/2)
a(n=2,m=2)=2 (namely 1/2= 1/3+1/6 = 1/4 +1/4)
a(n=2,m=3)=10 (namely 1/2= 1/3+1/7+1/42 = 1/3+1/8+1/24 = 1/3+1/9+1/18 = .. = 1/6+1/6+1/6
Conjectured:
"n=", 2, "m=", 1, 1
"n=", 2, "m=", 2, 2
"n=", 2, "m=", 3, 10
"n=", 2, "m=", 4, 108
"n=", 2, "m=", 5, 2892 # is this A003167?
"n=", 3, "m=", 1, 1
"n=", 3, "m=", 2, 2
"n=", 3, "m=", 3, 21
"n=", 3, "m=", 4, 339
"n=", 3, "m=", 5, 17253
"n=", 4, "m=", 1, 1
"n=", 4, "m=", 2, 3
"n=", 4, "m=", 3, 28
"n=", 4, "m=", 4, 694
# Maple program for this output:
# count solutions to sum_{i<= kcount) 1/ki = r, all ki>=kmin
Aaux := proc(r,kmin,kcount)
ret := [] ;
a := 0 ;
if r > 0 then
# only one term left which must match r exactly
if kcount = 1 then
c := 1/r ;
if type(c,'integer') and c >= kmin then
a := a+1 ;
ret := [[r]] ;
end if;
elif kcount > 1 then
# recursive call to take 1/k as the next term
for k from kmin do
klim := max(kmin,k) ;
c := procname( r-1/k, klim , kcount-1) ;
a := a+op(1,c) ;
if op(1,c) > 0 then
s := op(2,c) ;
for s2 in s do
ret := [op(ret),[1/k,op(s2)]] ;
end do;
end if;
if kcount/klim < r then
break;
end if;
end do;
end if:
end if;
# return count of solutions and the solutions themselves
[a ,ret];
end proc:
A := proc(n,m)
# initially request total sum of 1/n, minimum denom of 1 and m terms
Aaux(1/n,1,m) ;
end proc:
for n from 2 to 4 do
for m from 1 to 5 do
print("n=",n,"m=",m, op(1,A(n,m)) ) ;
end do:
end do:
More information about the SeqFan
mailing list