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 31 results. Next

A008846 Hypotenuses of primitive Pythagorean triangles.

Original entry on oeis.org

5, 13, 17, 25, 29, 37, 41, 53, 61, 65, 73, 85, 89, 97, 101, 109, 113, 125, 137, 145, 149, 157, 169, 173, 181, 185, 193, 197, 205, 221, 229, 233, 241, 257, 265, 269, 277, 281, 289, 293, 305, 313, 317, 325, 337, 349, 353, 365, 373, 377, 389, 397, 401, 409, 421, 425, 433
Offset: 1

Views

Author

N. J. A. Sloane, Ralph Peterson (RALPHP(AT)LIBRARY.nrl.navy.mil)

Keywords

Comments

Numbers of the form x^2 + y^2 where x is even, y is odd and gcd(x, y)=1. Essentially the same as A004613.
Numbers n for which there is no solution to 4/n = 2/x + 1/y for integers y > x > 0. Related to A073101. - T. D. Noe, Sep 30 2002
Discovered by Frénicle (on Pythagorean triangles): Méthode pour trouver ..., page 14 on 44. First text of Divers ouvrages ... Par Messieurs de l'Académie Royale des Sciences, in-folio, 6+518+1 pp., Paris, 1693. Also A020882 with only one of doubled terms (first: 65). - Paul Curtz, Sep 03 2008
All divisors of terms are of the form 4*k+1 (products of members of A002144). - Zak Seidov, Apr 13 2011
A024362(a(n)) > 0. - Reinhard Zumkeller, Dec 02 2012
Closed under multiplication. Primitive elements are in A002144. - Jean-Christophe Hervé, Nov 10 2013
Not only the square of these numbers is equal to the sum of two nonzero squares, but the numbers themselves also are; this sequence is then a subsequence of A004431. - Jean-Christophe Hervé, Nov 10 2013
Conjecture: numbers p for which sqrt(-1) exists in the p-adic numbering system. For example the 5-adic number ...2431212, when squared, gives ...4444444, which is -1, and 5 is in the sequence. - Thierry Banel, Aug 19 2022
The above conjecture was proven true by George Bergman. 3 known facts: (1) prime factors of a(n) are equal to 1 mod 4, (2) modulo such primes, sqrt(-1) exists, (3) if sqrt(m) exists mod r, r being odd, this extends to sqrt(m) in the r-adic ring. - Thierry Banel, Jul 04 2025

References

  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, pp. 10, 107.

Crossrefs

Subsequence of A004431 and of A000404 and of A339952; primitive elements: A002144.
Cf. A137409 (complement), disjoint union of A024409 and A120960.

Programs

  • Haskell
    a008846 n = a008846_list !! (n-1)
    a008846_list = filter f [1..] where
       f n = all ((== 1) . (`mod` 4)) $ filter ((== 0) . (n `mod`)) [1..n]
    -- Reinhard Zumkeller, Apr 27 2011
    
  • Maple
    for x from 1 by 2 to 50 do for y from 2 by 2 to 50 do if gcd(x,y) = 1 then print(x^2+y^2); fi; od; od; [ then sort ].
  • Mathematica
    Union[ Map[ Plus@@(#1^2)&, Select[ Flatten[ Array[ {2*#1, 2*#2-1}&, {10, 10} ], 1 ], GCD@@#1 == 1& ] ] ] (* Olivier Gérard, Aug 15 1997 *)
    lst = {}; Do[ If[ GCD[m, n] == 1, a = 2 m*n; b = m^2 - n^2; c = m^2 + n^2; AppendTo[lst, c]], {m, 100}, {n, If[ OddQ@m, 2, 1], m - 1, 2}]; Take[ Union@ lst, 57] (* Robert G. Wilson v, May 02 2009 *)
    Union[Sqrt[#[[1]]^2+#[[2]]^2]&/@Union[Sort/@({Times@@#,(Last[#]^2-First[#]^2)/2}&/@ (Select[Subsets[Range[1,33,2],{2}],GCD@@#==1&]))]] (* Harvey P. Dale, Aug 26 2012 *)
  • PARI
    is(n)=Set(factor(n)[,1]%4)==[1] \\ Charles R Greathouse IV, Nov 06 2015
    
  • Python
    # for an array from the beginning
    from math import gcd, isqrt
    hypothenuses_upto = 433
    A008846 = set()
    for x in range(2, isqrt(hypothenuses_upto)+1):
        for y in range(min(x-1, (yy:=isqrt(hypothenuses_upto-x**2))-(yy%2 == x%2)) , 0, -2):
            if gcd(x,y) == 1: A008846.add(x**2 + y**2)
    print(A008846:=sorted(A008846)) # Karl-Heinz Hofmann, Sep 30 2024
    
  • Python
    # for single k
    from sympy import factorint
    def A008846_isok(k): return not any([(pf-1) % 4 for pf in factorint(k)]) # Karl-Heinz Hofmann, Oct 01 2024

Formula

x^2 + y^2 where x is even, y is odd and gcd(x, y)=1. Essentially the same as A004613.

Extensions

More terms from T. D. Noe, Sep 30 2002

A192787 Number of distinct solutions of 4/n = 1/a + 1/b + 1/c in positive integers satisfying 1 <= a <= b <= c.

Original entry on oeis.org

0, 1, 3, 3, 2, 8, 7, 10, 6, 12, 9, 21, 4, 17, 39, 28, 4, 26, 11, 36, 29, 25, 21, 57, 10, 20, 29, 42, 7, 81, 19, 70, 31, 25, 65, 79, 9, 32, 73, 96, 7, 86, 14, 62, 93, 42, 34, 160, 18, 53, 52, 59, 13, 89, 98, 136, 41, 33, 27, 196, 11, 37, 155, 128, 49, 103, 17, 73, 55, 185, 40, 211, 7, 32, 129, 80, 97, 160, 37, 292
Offset: 1

Views

Author

Keywords

Comments

The Erdős-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.
See A073101 for the 4/n conjecture due to Erdős and Straus.

Examples

			a(1) = 0, since 4/1 = 4 cannot be expressed as the sum of three reciprocals.
a(2) = 1 because 4/2 = 1/1 + 1/2 + 1/2, and there are no other solutions.
a(3) = 3 since 4/3 = 1 + 1/4 + 1/12 = 1 + 1/6 + 1/6 = 1/2 + 1/2 + 1/3.
a(4) = 3 = A002966(3).
		

Crossrefs

A292581 counts the solutions with multiplicity. A073101 counts solutions with a, b, and c distinct.
Cf. A337432 (solutions with minimal c).

Programs

  • Maple
    A192787 := proc(n) local t,a,b,t1,count; t:= 4/n; count:= 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 type( 1/(t1 - 1/b),integer) then count:= count+1; end if end do end do; count; end proc; # Robert Israel, Feb 19 2013
  • Mathematica
    f[n_] := Length@ Solve[ 4/n == 1/x + 1/y + 1/z && 1 <= x <= y <= z, {x, y, z}, Integers]; Array[f, 70] (* Allan C. Wechsler and Robert G. Wilson v, Jul 19 2013 *)
  • PARI
    a(n, show=0)=my(t=4/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++; show&&print("4/",n," = 1/",a," + 1/",b," + 1/",c)))); s \\ variant with print(...) added by Robert Munafo, Feb 19 2013, both combined through option "show" by M. F. Hasler, Jul 02 2022

Extensions

Corrected at the suggestion of Allan C. Wechsler by Charles R Greathouse IV, Feb 19 2013
Examples and cross-references added by M. F. Hasler, Feb 19 2013

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

A075248 Number of solutions (x,y,z) to 5/n = 1/x + 1/y + 1/z satisfying 0 < x < y < z.

Original entry on oeis.org

0, 1, 2, 1, 1, 3, 5, 9, 6, 3, 12, 5, 18, 15, 10, 5, 21, 11, 22, 18, 15, 8, 55, 30, 15, 20, 43, 20, 45, 5, 24, 35, 23, 36, 53, 10, 21, 52, 62, 6, 62, 12, 73, 69, 16, 11, 92, 38, 84, 34, 50, 11, 77, 56, 80, 45, 38, 34, 142, 6, 23, 96, 53, 53, 67, 15, 66, 70, 124, 12, 148, 21, 57
Offset: 2

Views

Author

T. D. Noe, Sep 10 2002

Keywords

Comments

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 (A075249, A075250, A075251). See A073101 for the 4/n conjecture due to Erdős and Straus.

Examples

			a(4)=2 because there are two solutions: 5/4 = 1/1 + 1/5 + 1/20 and 5/4 = 1/1 + 1/6 + 1/12.
		

Crossrefs

Programs

  • Mathematica
    m = 5; 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[5/n == 1/x + 1/y + 1/z && 0 < x < y < z, {x, y, z}, Integers]; Array[f, 74] (* Robert G. Wilson v, Jul 17 2013 *)

A227610 Number of ways 1/n can be expressed as the sum of three distinct unit fractions: 1/n = 1/x + 1/y + 1/z satisfying 0 < x < y < z.

Original entry on oeis.org

1, 6, 15, 22, 30, 45, 36, 62, 69, 84, 56, 142, 53, 124, 178, 118, 67, 191, 74, 274, 227, 145, 87, 342, 146, 162, 216, 322, 100, 461, 84, 257, 304, 199, 435, 508, 79, 204, 360, 580, 115, 587, 98, 455, 618, 192, 129, 676, 217, 417, 369, 449, 119, 573, 543, 759, 367, 240, 166, 1236, 102, 261, 857, 428, 568, 717, 115, 537, 460, 1018, 155, 1126, 112, 276, 839
Offset: 1

Views

Author

Robert G. Wilson v, Jul 17 2013

Keywords

Comments

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

Examples

			a(1)=1 because 1 = 1/2 + 1/3 + 1/6;
a(2)=6 because 1/2 = 1/3 + 1/7 + 1/42 = 1/3 + 1/8 + 1/24 = 1/3 + 1/9 + 1/18 = 1/3 + 1/10 + 1/15 = 1/4 + 1/5 + 1/20 = 1/4 + 1/6 + 1/12;
a(3)=15 because 1/3 = 1/x + 1/y + 1/z presented as {x,y,z}: {4,13,156}, {4,14,84}, {4,15,60}, {4,16,48}, {4,18,36}, {4,20,30}, {4,21,28}, {5,8,120}, {5,9,45}, {5,10,30}, {5,12,20}, {6,7,42}, {6,8,24}, {6,9,18}, {6,10,15}; etc.
		

Crossrefs

Cf. A227611 (2/n), A075785 (3/n), A073101 (4/n), A075248 (5/n), A227612.

Programs

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

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),", "))
Showing 1-10 of 31 results. Next