A073101 Number of integer solutions (x,y,z) to 4/n = 1/x + 1/y + 1/z satisfying 0 < x < y < z.
0, 0, 1, 1, 2, 5, 5, 6, 4, 9, 7, 15, 4, 14, 33, 22, 4, 21, 9, 30, 25, 22, 19, 45, 10, 17, 25, 36, 7, 72, 17, 62, 27, 22, 59, 69, 9, 29, 67, 84, 7, 77, 12, 56, 87, 39, 32, 142, 16, 48, 46, 53, 13, 82, 92, 124, 37, 30, 25, 178, 11, 34, 147, 118, 49, 94, 15, 67, 51, 176, 38, 191, 7
Offset: 1
Keywords
Examples
a(5)=2 because there are two solutions: 4/5 = 1/2 + 1/4 + 1/20 and 4/5 = 1/2 + 1/5 + 1/10.
Links
- T. D. Noe, Table of n, a(n) for n = 1..1000, (corrected by _Peter Luschny_, Jan 19 2019)
- Christian Elsholtz, Sums Of k Unit Fractions, Trans. Amer. Math. Soc. 353 (2001), 3209-3227.
- David Eppstein, Algorithms for Egyptian Fractions
- Paul Erdős, Az 1/z_1 + 1/z_2 + ... + 1/z_n = a/b egyenlet egész számú megoldásairól, (On a Diophantine equation), Mat. Lapok, 1:192-210, 1050. Math. Rev. 13:208b.
- Ron Knott, Egyptian Fractions
- Eric Weisstein's World of Mathematics, Egyptian Fraction
- Wikipedia, Erdős-Straus conjecture
Crossrefs
Programs
-
Haskell
import Data.Ratio ((%), numerator, denominator) a073101 n = length [(x,y) | x <- [n `div` 4 + 1 .. 3 * n `div` 4], let y' = recip $ 4%n - 1%x, y <- [floor y' + 1 .. floor (2*y') + 1], let z' = recip $ 4%n - 1%x - 1%y, denominator z' == 1 && numerator z' > y && y > x] -- Reinhard Zumkeller, Jan 03 2011
-
Maple
A:= proc(n) local x,t, p,q,ds,zs,ys,js, tot,j; tot:= 0; for x from 1+floor(n/4) to ceil(3*n/4)-1 do t:= 4/n - 1/x; p:= numer(t); q:= denom(t); ds:= convert(select(d -> (d < q) and d + q mod p = 0, numtheory:-divisors(q^2)),list); ys:= map(d -> (d+q)/p, ds); zs:= map(d -> (q^2/d+q)/p, ds); js:= select(j -> ys[j] > x,[$1..nops(ds)]); tot:= tot + nops(js); od; tot; end proc: seq(A(n),n=2..100); # Robert Israel, Aug 22 2014
-
Mathematica
(* download Egypt.m from D. Eppstein's site and put it into MyOwn directory underneath Mathematica\AddOns\StandardPackages *) Needs["MyOwn`Egypt`"]; Table[ Length[ EgyptianFraction[4/n, Method -> Lexicographic, MaxTerms -> 3, MinTerms -> 3, Duplicates -> Disallow, OutputFormat -> Plain]], {n, 5, 80}] m = 4; For[lst = {}; n = 2, n <= 100, n++, cnt = 0; xr = n/m; If[IntegerQ[xr], xMin = xr + 1, xMin = Ceiling[xr]]; If[IntegerQ[3xr], xMax = 3xr - 1, xMax = Floor[3xr]]; For[x = xMin, x <= xMax, x++, yr = 1/(m/n - 1/x); If[IntegerQ[yr], yMin = yr + 1, yMin = Ceiling[yr]]; If[IntegerQ[2yr], yMax = 2yr + 1, yMax = Ceiling[2yr]]; For[y = yMin, y <= yMax, y++, zr = 1/(m/n - 1/x - 1/y); If[y > x && zr > y && IntegerQ[zr], z = zr; cnt++; (*Print[n, " ", x, " ", y, " ", z]*)]]]; AppendTo[lst, cnt]]; lst f[n_] := Length@ Solve[4/n == 1/x + 1/y + 1/z && 0 < x < y < z, {x, y, z}, Integers]; Array[f, 72, 2] (* Robert G. Wilson v, Jul 17 2013 *)
-
PARI
A073101(n)=sum(c=n\4+1,n*3\4,sum(b=c+1,ceil(2/(t=4/n-1/c))-1,numerator(t-1/b)==1)) \\ M. F. Hasler, May 15 2015
Extensions
Edited by T. D. Noe, Sep 10 2002
Extended to offset 1 with a(1) = 0 by M. F. Hasler, May 16 2015
Comments