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.

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.