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-2 of 2 results.

A376242 a(n) = least m >= 0 such that (x = f(A376241(n)), y = f(m), z = (x+y)/(xy-1)) yields an integer x+y+z = x*y*z, where f(m) = A002487(m)/A002487(m+1).

Original entry on oeis.org

0, 1, 2, 1, 6, 2, 2, 14, 4, 30, 12, 35, 2, 4, 9, 20, 4, 8, 126, 56, 32, 152, 52, 254, 61, 84, 40, 16, 4, 510, 368, 320, 212, 48, 396, 72, 583, 1022, 792, 368, 98, 188, 340, 80, 583, 339, 140, 32, 233, 2046, 480, 384, 583, 2062, 852, 188, 328
Offset: 1

Views

Author

M. F. Hasler, Sep 16 2024

Keywords

Comments

A376241 uses the Stern-Brocot sequence s = A002487 to enumerate all (nonnegative) rational x = s(n)/s(n+1) and similarly y = s(m)/s(m+1), WLOG m <= n, which yield an integer x*y*z = x+y+z with (necessarily) z = (x+y)/(xy-1). The present sequence lists the m-values corresponding to the n-values listed in A376241.

Examples

			The terms correspond to the following solutions, with y = A002487(m)/A002487(m+1):
   m |  x  |  y  |  z  | xyz = x+y+z
-----+-----+-----+-----+------------
   0 |  0  |  0  |  0  |   0
   1 |  2  |  1  |  3  |   6
   2 | 3/2 | 1/2 | -8  |  -6
   1 |  3  |  1  |  2  |   6
   6 | 4/3 | 2/3 | -18 |  -16
   2 | 5/2 | 1/2 |  12 |   15
   2 |  4  | 1/2 | 9/2 |   9
  14 | 5/4 | 3/4 | -32 |  -30
  ...| ... | ... | ... |  ...
		

Crossrefs

Cf. A002487 (Stern-Brocot sequence), A376241 (corresponding n values), A376243 (set of absolute values of corresponding xyz = x+y+z).

Programs

  • PARI
    A376242(n, k=A376241(n))={my(p, q=1, x=A002487(k)/A002487(k+1)); for(m=2, k, my(y=(p=q)/q=A002487(m)); x*y != 1 && denominator(x+y+(x+y)/(x*y-1))==1 && return(m-1))} \\ Short of a function A376241(n), one can simply provide a term k = A376241(n) as second argument and omit the first argument n.

A376241 Indices k such that there exists m <= k such that x+y+z = x*y*z is an integer for x = f(k) := A002487(k)/A002487(k+1), y = f(m) and z = (x+y)/(xy-1).

Original entry on oeis.org

0, 3, 5, 7, 9, 11, 15, 17, 27, 33, 43, 44, 47, 55, 65, 107, 111, 119, 129, 135, 159, 167, 171, 257, 258, 427, 439, 495, 511, 513, 527, 575, 683, 751, 947, 951, 961, 1025, 1127, 1167, 1181, 1539, 1707, 1775, 1797, 1836, 1971, 2015, 2022, 2049, 2079, 2175, 2232, 2289, 2731, 3395, 3511
Offset: 1

Views

Author

M. F. Hasler, Sep 16 2024

Keywords

Comments

This uses the Stern-Brocot sequence s = A002487 to enumerate all (nonnegative) rational x = s(n)/s(n+1) and similarly y = s(m)/s(m+1) (WLOG m <= n) which yield a rational solution {x, y, z} for the "Sum equals product problem", x*y*z = x+y+z = integer. The equality implies that z = (x+y)/(xy-1).
(z may be negative for negative integer solutions, which correspond to positive solutions if all the signs of (x, y, z) are flipped.

Examples

			The terms correspond to the following solutions, with x = A002487(k)/A002487(k+1):
   k |  x  |  y  |  z  | xyz = x+y+z
  ---+-----+-----+-----+------------
   0 |  0  |  0  |  0  |   0
   3 |  2  |  1  |  3  |   6
   5 | 3/2 | 1/2 | -8  |  -6
   7 |  3  |  1  |  2  |   6
   9 | 4/3 | 2/3 | -18 |  -16
  11 | 5/2 | 1/2 |  12 |   15
  15 |  4  | 1/2 | 9/2 |   9
  17 | 5/4 | 3/4 | -32 |  -30
		

Crossrefs

Cf. A002487 (Stern-Brocot sequence), A376242 (corresponding m values), A376243 (set of absolute values of corresponding xyz = x+y+z).

Programs

  • PARI
    is_A376241(n)={my(p, q=1, x=A002487(n)/A002487(n+1)); !n|| for(m=2, n, my(y=(p=q)/q=A002487(m)); x*y != 1 && denominator(x+y+(x+y)/(x*y-1))==1 && return(y))} \\ Return y=f(m) with the least possible m>0 such that x=f(n) and z=(x+y)/(xy-1) yield integer xyz = x+y+z, else zero.
Showing 1-2 of 2 results.