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.

A337683 Number of distinct positive integer pairs, (s,t), with s < t < n such that neither s nor t divides n and the harmonic mean of s and t is an integer.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 2, 1, 1, 1, 2, 0, 4, 3, 3, 4, 6, 2, 8, 5, 8, 9, 10, 3, 11, 11, 9, 10, 14, 7, 18, 14, 16, 17, 17, 9, 22, 21, 20, 13, 24, 16, 28, 25, 21, 31, 32, 19, 33, 28, 32, 31, 34, 25, 34, 28, 36, 37, 38, 17, 44, 43, 37, 40, 44, 40, 50, 47, 48, 39, 52, 28, 56, 55, 48, 55
Offset: 1

Views

Author

Wesley Ivan Hurt, Sep 15 2020

Keywords

Examples

			a(7) = 2; There are 2 distinct positive integer pairs, (s,t), with s < t < 7 such that neither s nor t divides 7 and the harmonic mean of s and t is an integer. They are (2,6) and (3,6).
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(1 - Ceiling[2 (i*k)/(k + i)] + Floor[2 (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(2*(k*i)/(k+i)) + floor(2*(k*i)/(k+i))).