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.

A337101 Number of partitions of n into two positive parts (s,t), s <= t, such that the harmonic mean of s and t is an integer.

Original entry on oeis.org

0, 1, 0, 1, 0, 1, 0, 2, 1, 1, 0, 1, 0, 1, 0, 2, 0, 3, 0, 1, 0, 1, 0, 2, 2, 1, 1, 1, 0, 1, 0, 4, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 1, 1, 1, 0, 2, 3, 5, 0, 1, 0, 3, 0, 2, 0, 1, 0, 1, 0, 1, 1, 4, 0, 1, 0, 1, 0, 1, 0, 6, 0, 1, 2, 1, 0, 1, 0, 2, 4, 1, 0, 1, 0, 1, 0, 2, 0, 3, 0, 1, 0, 1, 0, 4, 0, 7
Offset: 1

Views

Author

Wesley Ivan Hurt, Aug 15 2020

Keywords

Comments

Number of solutions, (s,t,k), to s^2 + t^2 = k*n such that s + t = n, 1 <= s <= t and 1 <= k <= n-1. - Wesley Ivan Hurt, Oct 01 2020

Crossrefs

Programs

  • Mathematica
    Table[Sum[1 - Ceiling[2*i*(n - i)/n] + Floor[2*i*(n - i)/n], {i, Floor[n/2]}], {n, 100}]
    Table[Sum[Sum[KroneckerDelta[(i^2 + (n - i)^2)/k, n], {k, n - 1}], {i, Floor[n/2]}], {n, 100}]
  • PARI
    A337101(n) = { my(u,t); sum(s=1, n\2, t = n-s; u = (s^2 + t^2); (!(u%n) && (u/n) <= n-1)); }; \\ Antti Karttunen, Dec 12 2021

Formula

a(n) = Sum_{i=1..floor(n/2)} (1 - ceiling(2*i*(n-i)/n) + floor(2*i*(n-i)/n)).
a(n) = A004526(n) - A337102(n).
a(n) = Sum_{i=1..floor(n/2)} Sum_{k=1..n-1} [i^2 + (n-i)^2 = n*k], where [ ] is the Iverson bracket. - Wesley Ivan Hurt, Oct 01 2020