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.

A337680 Number of distinct positive integer pairs, (s,t), such that s < t < n where neither s nor t divides n, and (t - s) | (t + s).

Original entry on oeis.org

0, 0, 0, 0, 3, 1, 9, 5, 10, 11, 22, 9, 30, 25, 27, 29, 46, 28, 55, 37, 53, 62, 73, 43, 77, 80, 78, 76, 103, 69, 115, 95, 112, 121, 121, 91, 148, 143, 144, 121, 168, 132, 180, 161, 158, 191, 202, 149, 208, 192, 215, 210, 237, 193, 237, 215, 253, 262, 273, 197, 289, 284, 264, 272
Offset: 1

Views

Author

Wesley Ivan Hurt, Sep 15 2020

Keywords

Examples

			a(7) = 9; There are 9 positive integer pairs, (s,t), such that s < t < 7, neither s nor t divides 7, and where (t - s) | (t + s). They are (2,3), (2,4), (2,6), (3,4), (3,5), (3,6), (4,5), (4,6) and (5,6).
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(1 - Ceiling[(i + k)/(k - i)] + Floor[(i + k)/(k - i)]) (Ceiling[n/k] - Floor[n/k]) (Ceiling[n/i] - Floor[n/i]), {i, k - 1}], {k, n}], {n, 100}]

Formula

a(n) = Sum_{k=1..n} Sum_{i=1..k-1} (ceiling(n/k) - floor(n/k)) * (ceiling(n/i) - floor(n/i)) * (1 - ceiling((k+i)/(k-i)) + floor((k+i)/(k-i))).