cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 15 results. Next

A073101 Number of integer solutions (x,y,z) to 4/n = 1/x + 1/y + 1/z satisfying 0 < x < y < z.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Aug 18 2002

Keywords

Comments

In 1948 Erdős and Straus conjectured that for any positive integer n >= 2 the equation 4/n = 1/x + 1/y + 1/z has a solution with positive integers x, y and z (without the additional requirement 0 < x < y < z). All of the solutions can be printed by removing the comment symbols from the Mathematica program. For the solution (x,y,z) having the largest z value, see (A075245, A075246, A075247). See A075248 for Sierpiński's conjecture for 5/n.
See (A257839, A257840, A257841) for the lexicographically smallest solutions, and A257843 for the differences between these and those with largest z-value. - M. F. Hasler, May 16 2015

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.
		

Crossrefs

Cf. A192787 (# distinct solutions with x <= y <= z).

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

A004194 Number of partitions of 1/n into 3 reciprocals of positive integers.

Original entry on oeis.org

3, 10, 21, 28, 36, 57, 42, 70, 79, 96, 62, 160, 59, 136, 196, 128, 73, 211, 80, 292, 245, 157, 93, 366, 156, 174, 230, 340, 106, 497, 90, 269, 322, 211, 453, 538, 85, 216, 378, 604, 121, 623, 104, 473, 648, 204, 135, 706, 227, 437, 387, 467, 125, 601, 561, 783, 385
Offset: 1

Views

Author

Scott Aaronson (philomath(AT)voicenet.com)

Keywords

Comments

Number of ways to express 1/n as Egyptian fractions in just three terms; i.e., 1/n = 1/x + 1/y + 1/z satisfying 1<=x<=y<=z.
See A073101 for the 4/n conjecture due to Erdős and Straus.

Crossrefs

Programs

  • Mathematica
    a[n_] := Length@ Solve[ 1/n == 1/x + 1/y + 1/z && 1 <= x <= y <= z, {x, y, z}, Integers]; Array[a, 70] (* Allan C. Wechsler and Robert G. Wilson v, Aug 17 2013 *)
  • PARI
    a(n)=my(t=1/n, t1, s, c); for(a=1\t+1, 3\t, t1=t-1/a; for(b=max(1\t1+1, a), 2\t1, c=1/(t1-1/b); if(denominator(c)==1&&c>=b, s++))); s \\ Charles R Greathouse IV, Jun 12 2013

Extensions

More terms from David W. Wilson, Aug 15 1996

A075245 x-value of the solution (x,y,z) to 4/n = 1/x + 1/y + 1/z satisfying 0 < x < y < z and having the largest z-value. The y and z components are in A075246 and A075247.

Original entry on oeis.org

1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 14, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 20, 19, 19, 20, 20, 20, 20, 21, 21, 21
Offset: 3

Views

Author

T. D. Noe, Sep 10 2002

Keywords

Comments

See A073101 for more details.
a(n) = floor(n/4) + 1, at least up to n = 2000, except for some n = 8k+1 (k = 6, 9, 11, 14, 20, 21, 24, 29, 30, 35, 39, 41, 44, 45, 50, ...), where a(n) is one larger than a(n-1) and a(n+1). - M. F. Hasler, Jul 02 2022

Examples

			For n = 3, we have a(3) = 1 = x in 4/3 = 1/x + 1/y + 1/z with y = 4 and z = 12 which is the largest possible z: Indeed, x < y < z gives 4/3 < 3/x, so only x = 1 and 2 are possible, and then with y < z, 2/y > 4/3 - 1/x is impossible for x = 2 < y < 12/5 and for x = 1 < y < 6 only y = 4 gives a solution.
		

Crossrefs

Programs

  • Maple
    A075245:= proc () local t, n, a, b, t1, largex, largez; for n from 3 to 100 do t := 4/n; largez := 0; largex := 0; for a from floor(1/t)+1 to floor(3/t) do t1 := t-1/a; for b from max(a, floor(1/t1)+1) to floor(2/t1) do if `and`(type(1/(t1-1/b), integer), a < b, b < 1/(t1-1/b)) then if largez < 1/(t1-1/b) then largez := 1/(t1-1/b); largex := a end if end if end do end do; lprint(n, largex) end do end proc; # [program derived from A192787] Patrick J. McNab, Aug 20 2014
  • Mathematica
    For[xLst={}; yLst={}; zLst={}; n=3, n<=100, n++, cnt=0; xr=n/4; If[IntegerQ[xr], x=xr+1, x=Ceiling[xr]]; While[yr=1/(4/n-1/x); If[IntegerQ[yr], y=yr+1, y=Ceiling[yr]]; cnt==0&&y>x, While[zr=1/(4/n-1/x-1/y); cnt==0&&zr>y, If[IntegerQ[zr], z=zr; cnt++; AppendTo[xLst, x]; AppendTo[yLst, y]; AppendTo[zLst, z]]; y++ ]; x++ ]]; xLst
  • PARI
    apply( {A075245(n,c=1,a)=for(x=n\4+1, 3*n\4, my(t=4/n-1/x); for(y=max(1\t,x)+1, ceil(2/t)-1, t-1/y >= c && break; numerator(t-1/y)==1 && [c,a]=[t-1/y,x])); a}, [3..99]) \\ M. F. Hasler, Jul 02 2022

Formula

Conjecture: a(n) = floor(n/4) + d, with d = 1 except for some n = 8k+1 (k = 6, 9, 11, 14, 20, 21, 24, 29, 30, 35, 39, ...) where d = 2 . - M. F. Hasler, Jul 02 2022

A075246 y-value of the solution (x,y,z) to 4/n = 1/x + 1/y + 1/z satisfying 0 < x < y < z and having the largest z-value. The x and z components are in A075245 and A075247.

Original entry on oeis.org

4, 3, 4, 7, 15, 7, 10, 16, 34, 13, 18, 29, 61, 21, 30, 46, 96, 31, 43, 67, 139, 43, 60, 92, 190, 57, 78, 121, 249, 73, 100, 154, 316, 91, 124, 191, 391, 111, 154, 232, 474, 133, 181, 277, 565, 157, 99, 326, 664, 183, 248, 379, 771, 211, 286, 436, 886, 241, 326
Offset: 3

Views

Author

T. D. Noe, Sep 10 2002

Keywords

Comments

See A073101 for more details.
See A257840 for a variant that differs from a(89) on. - M. F. Hasler, Jul 03 2022

Crossrefs

Cf. A073101 (number of solutions), A075245 (x values), A075247 (z values), A192787 (number of solutions with x <= y <= z), A257840 (variant: lex earliest solution, not largest z).

Programs

  • Maple
    A075246:=proc() local t, n,a,b,t1,largey,largez; for n from 3 to 100 do t:=4/n; largez:=0; largey:=0; for a from floor(1/t)+1 to floor(3/t) do t1:=t - 1/a; for b from max(a,floor(1/t1)+1) to floor(2/(t1)) do if and(type(1/(t1 - 1/b),integer),alargez then largez:=(1/(t1 - 1/b)); largey:=b; end if end if end do; end do; lprint(n, largey) end do; end proc; # [program derived from A192787] Patrick J. McNab, Aug 20 2014
  • Mathematica
    For[xLst={}; yLst={}; zLst={}; n=3, n<=100, n++, cnt=0; xr=n/4; If[IntegerQ[xr], x=xr+1, x=Ceiling[xr]]; While[yr=1/(4/n-1/x); If[IntegerQ[yr], y=yr+1, y=Ceiling[yr]]; cnt==0&&y>x, While[zr=1/(4/n-1/x-1/y); cnt==0&&zr>y, If[IntegerQ[zr], z=zr; cnt++; AppendTo[xLst, x]; AppendTo[yLst, y]; AppendTo[zLst, z]]; y++ ]; x++ ]]; yLst
  • PARI
    apply( {A075246(n, c=1, a, t)=for(x=n\4+1, 3*n\4, for(y=max(1\t=4/n-1/x, x)+1, ceil(2/t)-1, t-1/y >= c && break; numerator(t-1/y)==1 && [c, a]=[t-1/y, y])); a}, [3..99]) \\ M. F. Hasler, Jul 03 2022

A075247 Largest possible z-value of an integer solution (x,y,z) to 4/n = 1/x + 1/y + 1/z satisfying 0 < x < y < z. The x and y components are in A075245 and A075246.

Original entry on oeis.org

12, 6, 20, 42, 210, 42, 90, 240, 1122, 156, 468, 812, 3660, 420, 510, 2070, 9120, 930, 1806, 4422, 19182, 1806, 2100, 8372, 35910, 3192, 9048, 14520, 61752, 5256, 9900, 23562, 99540, 8190, 22940, 36290, 152490, 12210, 6314, 53592, 224202, 17556
Offset: 3

Views

Author

T. D. Noe, Sep 10 2002

Keywords

Comments

See A073101 for more details.

Examples

			For n = 6 we have a(n) = 42 the largest possible z in a solution of 4/n = 2/3 = 1/x + 1/y + 1/z with 0 < x < y < z in the integers. Indeed, from 1/x < 2/3 < 3/x we have 3/2 < x < 9/2. For x = 2 we get 2/y > 2/3 - 1/2 = 1/6 > 1/y <=> 6 < y < 12, and each of these y except y = 11 yields a solution, with z = 42, 24, 18, 15 and 12. There are no other possible z values: x = 3 gives 2/y > 1/3 <=> y < 6 and indeed y = 4 gives a solution with z = 12, no solution for y = 5; finally, x = 4 gives 2/y > 5/12 <=> y < 24/5, impossible with y > x.
		

Crossrefs

Cf. A075245 (x values), A075246 (y values), A073101 (number of solutions), A192787 (solutions with x <= y <= z).

Programs

  • Maple
    A075247:= proc () local t, n, a, b, t1, largey, largez; for n from 3 to 100 do t := 4/n; largez := 0; for a from floor(1/t)+1 to floor(3/t) do t1 := t-1/a; for b from max(a, floor(1/t1)+1) to floor(2/t1) do if `and`(type(1/(t1-1/b), integer), a < b, b < 1/(t1-1/b)) then if largez < 1/(t1-1/b) then largez := 1/(t1-1/b) end if end if end do end do; lprint(n, largez) end do end proc; # [program derived from A192787] Patrick J. McNab, Aug 20 2014
  • Mathematica
    For[xLst={}; yLst={}; zLst={}; n=3, n<=100, n++, cnt=0; xr=n/4; If[IntegerQ[xr], x=xr+1, x=Ceiling[xr]]; While[yr=1/(4/n-1/x); If[IntegerQ[yr], y=yr+1, y=Ceiling[yr]]; cnt==0&&y>x, While[zr=1/(4/n-1/x-1/y); cnt==0&&zr>y, If[IntegerQ[zr], z=zr; cnt++; AppendTo[xLst, x]; AppendTo[yLst, y]; AppendTo[zLst, z]]; y++ ]; x++ ]]; zLst
  • PARI
    apply( {A075247(n, c=1, t)=for(x=n\4+1, 3*n\4, for(y=max(1\t=4/n-1/x, x)+1, ceil(2/t)-1, t-1/y >= c && break; numerator(t-1/y)==1 && c=t-1/y)); 1/c}, [3..99]) \\ M. F. Hasler, Jul 02 2022

A226645 Number of ways to express 6/n as Egyptian fractions in just three terms; i.e., 6/n = 1/x + 1/y + 1/z satisfying 1<=x<=y<=z.

Original entry on oeis.org

0, 1, 1, 3, 3, 3, 1, 6, 8, 10, 7, 10, 1, 9, 12, 20, 8, 21, 2, 21, 17, 16, 11, 28, 7, 11, 26, 33, 9, 36, 3, 31, 25, 24, 60, 57, 2, 11, 20, 68, 10, 42, 6, 35, 81, 23, 15, 70, 10, 37, 25, 51, 14, 79, 33, 76, 32, 30, 20, 96, 2, 17, 86, 65, 48, 62, 9, 50, 42, 138, 35, 160, 2, 18, 53, 51, 52, 59, 8, 142, 89, 34, 23, 136, 37, 24, 33, 140, 23, 196, 30, 46, 37, 32, 75, 128, 5, 43, 103, 98
Offset: 1

Views

Author

Keywords

Comments

See A073101 for the 4/n conjecture due to Erdős and Straus.

Crossrefs

Programs

  • Mathematica
    a[n_] := Length@ Solve[ 6/n == 1/x + 1/y + 1/z && 1 <= x <= y <= z, {x, y, z}, Integers]; Array[a, 70]

A292581 Number of solutions to 4/n = 1/x + 1/y + 1/z in positive integers.

Original entry on oeis.org

0, 3, 12, 10, 12, 39, 36, 46, 30, 63, 48, 106, 24, 93, 216, 148, 24, 141, 60, 196, 162, 141, 120, 304, 60, 111, 162, 232, 42, 459, 108, 394, 174, 141, 372, 442, 54, 183, 420, 538, 42, 489, 78, 352, 540, 243, 198, 904, 102, 303, 294, 334, 78, 513
Offset: 1

Views

Author

Hugo Pfoertner, Sep 20 2017

Keywords

Comments

Corrected version of A192786.
The Erdos-Straus conjecture is that a(n) > 0 for n > 1. Swett verified the conjecture for n < 10^14.
Vaughan shows that the number of n < x with a(n) = 0 is at most x exp(-c * (log x)^(2/3)) for some c > 0.
After a(2) = 3, the values shown are all composite. [Jonathan Vos Post, Jul 17 2011]

Examples

			a(3)=12 because 4/3 can be expressed in 12 ways:
  4/3 =  1/1  + 1/4  + 1/12
  4/3 =  1/1  + 1/6  + 1/6
  4/3 =  1/1  + 1/12 + 1/4
  4/3 =  1/2  + 1/2  + 1/3
  4/3 =  1/2  + 1/3  + 1/2
  4/3 =  1/3  + 1/2  + 1/2
  4/3 =  1/4  + 1/1  + 1/12
  4/3 =  1/4  + 1/12 + 1/1
  4/3 =  1/6  + 1/1  + 1/6
  4/3 =  1/6  + 1/6  + 1/1
  4/3 =  1/12 + 1/1  + 1/4
  4/3 =  1/12 + 1/4  + 1/1
a(4) = 10 because 4/4 = 1 can be expressed in 10 ways:
  4/4=  1/2 + 1/3 + 1/6
  4/4=  1/2 + 1/4 + 1/4
  4/4=  1/2 + 1/6 + 1/3
  4/4=  1/3 + 1/2 + 1/6
  4/4=  1/3 + 1/3 + 1/3
  4/4=  1/3 + 1/6 + 1/2
  4/4=  1/4 + 1/2 + 1/4
  4/4=  1/4 + 1/4 + 1/2
  4/4=  1/6 + 1/2 + 1/3
  4/4=  1/6 + 1/3 + 1/2
		

Crossrefs

For more references and links see A192787.

Programs

  • Mathematica
    checkmult[a_, b_, c_] := If[Denominator[c] == 1, If[a == b && a == c && b == c, Return[1], If[a != b && a != c && b != c, Return[6], Return[3]]], Return[0]];
    a292581[n_] := Module[{t, t1, s, a, b, c, q = Quotient}, t = 4/n; s = 0; For[a = q[1, t]+1, a <= q[3, t], a++, t1 = t - 1/a; For[b = Max[q[1, t1] + 1, a], b <= q[2, t1], b++, c = 1/(t1 - 1/b); s += checkmult[a, b, c]]]; Return[s]];
    Reap[For[n=1, n <= 54, n++, Print[n, " ", an = a292581[n]]; Sow[an]]][[2, 1]] (* Jean-François Alcover, Dec 02 2018, adapted from PARI *)
  • PARI
    \\ modified version of code by Charles R Greathouse IV in A192786
    checkmult (a,b,c) =
    {
      if(denominator(c)==1,
         if(a==b && a==c && b==c,
            return(1),
            if(a!=b && a!=c && b!=c,
               return(6),
               return(3)
              )
           ),
         return(0)
         )
    }
    a292581(n) =
    {
      local(t, t1, s, a, b, c);
      t = 4/n;
      s = 0;
      for (a=1\t+1, 3\t,
         t1=t-1/a;
         for (b=max(1\t1+1,a), 2\t1,
              c=1/(t1-1/b);
              s+=checkmult(a,b,c);
             )
          );
         return(s);
    }
    for (n=1,54,print1(a292581(n),", "))

A226641 Number of ways to express 2/n as Egyptian fractions in just three terms; i.e., 2/n = 1/x + 1/y + 1/z satisfying 1<=x<=y<=z.

Original entry on oeis.org

1, 3, 8, 10, 12, 21, 17, 28, 26, 36, 25, 57, 20, 42, 81, 70, 25, 79, 32, 96, 86, 62, 42, 160, 53, 59, 89, 136, 33, 196, 37, 128, 103, 73, 185, 211, 32, 80, 160, 292, 40, 245, 40, 157, 235, 93, 60, 366, 85, 156, 147, 174, 42, 230, 223, 340, 143, 106, 76, 497, 34, 90, 331, 269, 206, 322, 50, 211, 175, 453, 72, 538, 37, 85, 332, 216, 260, 378, 69, 604, 167, 121, 79, 623, 204, 104, 203, 473, 59, 648, 253, 204, 166, 135, 318, 706, 46, 227, 427, 437
Offset: 1

Views

Author

Keywords

Crossrefs

See A073101 for the 4/n conjecture due to Erdős and Straus.

Programs

  • Mathematica
    a[n_] := Length@ Solve[ 2/n == 1/x + 1/y + 1/z && 1 <= x <= y <= z, {x, y, z}, Integers]; Array[a, 70]

A226642 Number of ways to express 3/n as Egyptian fractions in just three terms; i.e., 3/n = 1/x + 1/y + 1/z satisfying 1<=x<=y<=z.

Original entry on oeis.org

1, 3, 3, 6, 10, 10, 9, 20, 21, 21, 16, 28, 11, 33, 36, 31, 24, 57, 11, 68, 42, 35, 23, 70, 37, 51, 79, 76, 30, 96, 17, 65, 62, 50, 138, 160, 18, 51, 59, 142, 34, 136, 24, 140, 196, 46, 32, 128, 43, 98, 73, 111, 46, 211, 111, 192, 80, 63, 46, 292, 24, 81, 245
Offset: 1

Views

Author

Keywords

Comments

See A073101 for the 4/n conjecture due to Erdős and Straus.

Crossrefs

Programs

  • Mathematica
    f[n_] := Length@ Solve[ 3/n == 1/x + 1/y + 1/z && 1 <= x <= y <= z, {x, y, z}, Integers]; Array[f, 70]

A226644 Number of ways to express 5/n as Egyptian fractions in just three terms; i.e., 5/n = 1/x + 1/y + 1/z satisfying 1<=x<=y<=z.

Original entry on oeis.org

0, 1, 2, 4, 3, 4, 4, 7, 12, 10, 3, 17, 6, 21, 21, 12, 6, 26, 13, 28, 22, 18, 9, 61, 36, 18, 24, 48, 22, 57, 5, 27, 38, 26, 42, 60, 11, 24, 56, 70, 6, 71, 13, 79, 79, 19, 12, 99, 41, 96, 38, 55, 12, 84, 62, 86, 50, 41, 36, 160, 6, 26, 104, 57, 59, 76, 16, 71, 74, 136, 12, 158, 22, 60, 196, 52, 65, 103, 25, 128, 46, 30, 15, 224, 73, 32, 58, 141, 38, 211, 71, 67, 59, 41, 80, 151, 24, 97, 222, 292
Offset: 1

Views

Author

Keywords

Comments

See A073101 for the 4/n conjecture due to Erdős and Straus.

Crossrefs

Programs

  • Mathematica
    f[n_] := Length@ Solve[ 5/n == 1/x + 1/y + 1/z && 1 <= x <= y <= z, {x, y, z}, Integers]; Array[f, 70]
Showing 1-10 of 15 results. Next