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.

A192789 Number of distinct solutions of 4/p = 1/a + 1/b + 1/c in positive integers satisfying 1<=a<=b<=c where p is the n-th prime.

Original entry on oeis.org

1, 3, 2, 7, 9, 4, 4, 11, 21, 7, 19, 9, 7, 14, 34, 13, 27, 11, 17, 40, 7, 37, 27, 10, 8, 16, 27, 25, 15, 13, 33, 32, 17, 36, 18, 31, 24, 24, 65, 26, 47, 17, 67, 6, 23, 42, 30, 58, 37, 20, 19, 106, 8, 51, 19, 71, 28, 48, 31, 17, 33, 34, 40, 79, 16, 34, 38, 21, 39, 32, 19, 110, 52, 33, 39, 86, 30, 29, 23, 15, 81, 16, 93, 19
Offset: 1

Views

Author

Keywords

Comments

The Erdos-Straus conjecture is equivalent to the conjecture that a(n) > 0 for all n.

Examples

			a(1) = 1 because 4/prime(1) = 1/1 + 1/2 + 1/2.
		

Crossrefs

A292624 counts the solutions with multiplicity.

Programs

  • Maple
    a:= n-> A192787(ithprime(n)):
    seq(a(n), n=1..70);
  • Mathematica
    a[n_] := a[n] = Module[{a, b, c, r}, r = Reduce[1 <= a <= b <= c && 4/Prime[n] == 1/a + 1/b + 1/c, {a, b, c}, Integers]; Which[Head[r] === Or, Length[r], Head[r] === And, 1, r === False, 0, True, Print["error: ", r]]];
    Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 84}] (* Jean-François Alcover, Nov 22 2017 *)
  • PARI
    a(n)=my(t=4/prime(n), t1, s, c); for(a=1\t+1, 3\t, t1=t-1/a; for(b=1\t1+1, 2\t1, c=1/(t1-1/b); if(denominator(c)==1&&c>=b, s++))); s

Formula

a(n) = A192787(prime(n)). - Michel Marcus, Aug 20 2014