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.

A379815 a(n) is the smallest integer k > n such that sqrt(1/n + 1/k) is a rational number; or 0 if no such k exists.

Original entry on oeis.org

0, 16, 9, 0, 20, 12, 441, 64, 16, 90, 1089, 36, 4212, 98, 225, 0, 272, 144, 549081, 25, 567, 2156, 13225, 48, 144, 650, 81, 98, 142100, 150, 71622369, 256, 363, 578, 1225, 64, 1332, 684, 468, 360, 41984, 252, 521345889, 198, 180, 559682, 108241, 144, 63, 400, 127449, 117, 1755572, 108, 2420, 392, 4275, 568458
Offset: 1

Views

Author

Felix Huber, Feb 07 2025

Keywords

Comments

a(1) = a(4) = a(16) = 0. Proof: See Huber link.
k > n exists for n > 16.

Examples

			a(3) = 9 because sqrt(1/3 + 1/4) = sqrt(7/12) is irrational, sqrt(1/3 + 1/5) = sqrt(8/15) is irrational, sqrt(1/3 + 1/6) = sqrt(1/2) is irrational, sqrt(1/3 + 1/7) = sqrt(10/21) is irrational, sqrt(1/3 + 1/8) = sqrt(11/24) is irrational, but sqrt(1/3 + 1/9) = sqrt(4/9) = 2/3 is rational.
		

Crossrefs

Programs

  • Maple
    A379815:=proc(n)
        local k;
        if n=1 or n=4 or n=16 then
            return 0
        else
            for k from n+1 do
                if type(sqrt(1/n+1/k),rational) then
                    return k
                fi
            od
        fi;
    end proc;
    seq(A379815(n),n=1..58);
  • PARI
    a(n) = if ((n==1) || (n==4) || (n==16), return(0)); my(k=n+1); while (!issquare(1/n + 1/k), k++); k; \\ Michel Marcus, Feb 08 2025

Formula

a(n) <= n*A002350(n)^2 - n if n is not a square; a(m^2) <= A076600(m)^2. - Jinyuan Wang, Feb 11 2025

A357372 Square array A(n, k), n, k > 0, read by antidiagonals; A(n, k) is the numerator of 1/n + 1/k.

Original entry on oeis.org

2, 3, 3, 4, 1, 4, 5, 5, 5, 5, 6, 3, 2, 3, 6, 7, 7, 7, 7, 7, 7, 8, 2, 8, 1, 8, 2, 8, 9, 9, 1, 9, 9, 1, 9, 9, 10, 5, 10, 5, 2, 5, 10, 5, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 3, 4, 3, 12, 1, 12, 3, 4, 3, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13
Offset: 1

Views

Author

Rémy Sigrist, Sep 25 2022

Keywords

Comments

See A257522 for the corresponding denominators.

Examples

			Array A(n, k) begins:
  n\k |  1   2   3   4   5   6   7   8   9  10  11  12  13
  ----+---------------------------------------------------
    1 |  2   3   4   5   6   7   8   9  10  11  12  13  14
    2 |  3   1   5   3   7   2   9   5  11   3  13   7  15
    3 |  4   5   2   7   8   1  10  11   4  13  14   5  16
    4 |  5   3   7   1   9   5  11   3  13   7  15   1  17
    5 |  6   7   8   9   2  11  12  13  14   3  16  17  18
    6 |  7   2   1   5  11   1  13   7   5   4  17   1  19
    7 |  8   9  10  11  12  13   2  15  16  17  18  19  20
    8 |  9   5  11   3  13   7  15   1  17   9  19   5  21
    9 | 10  11   4  13  14   5  16  17   2  19  20   7  22
   10 | 11   3  13   7   3   4  17   9  19   1  21  11  23
   11 | 12  13  14  15  16  17  18  19  20  21   2  23  24
   12 | 13   7   5   1  17   1  19   5   7  11  23   1  25
   13 | 14  15  16  17  18  19  20  21  22  23  24  25   2
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Numerator[1/i + 1/(m - i)], {m, 13}, {i, m - 1}]]
  • PARI
    A(n,k) = numerator(1/n + 1/k)

Formula

A(n, k) = (n + k) / gcd(n + k, n*k).
A(n, k) = A(k, n).
A(n, 1) = n + 1.
A(n, n) = A000034(n).
A(n, n+1) = 2*n + 1.
Showing 1-2 of 2 results.