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.

A051516 Number of triangles with perimeter n having integer sides and area.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 4, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 3, 0, 2, 0, 0, 0, 4, 0, 1, 0, 0, 0, 3, 0, 0, 0, 5, 0, 1, 0, 1, 0, 2, 0, 5, 0, 0, 0, 1, 0, 1, 0, 4, 0, 0, 0, 8, 0, 0, 0, 1, 0, 5, 0, 0, 0, 0, 0, 5, 0, 6, 0, 5, 0, 0, 0, 2, 0, 0, 0, 12, 0, 1, 0
Offset: 1

Views

Author

Keywords

Comments

No such triangles with odd perimeter exist.

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[(1 - Ceiling[Sqrt[(n/2) (n/2 - i) (n/2 - k) (i + k - n/2)]] + Floor[Sqrt[(n/2) (n/2 - i) (n/2 - k) (i + k - n/2)]])*Sign[Floor[(i + k)/(n - i - k + 1)]], {i, k, Floor[(n - k)/2]}], {k, Floor[n/3]}], {n, 100}] (* Wesley Ivan Hurt, May 11 2019 *)

Formula

a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} (1 - ceiling(m) + floor(m)) * sign(floor((i+k)/(n-i-k+1))), where m = sqrt((n/2)*(n/2-i)*(n/2-k)*(i+k-n/2)). - Wesley Ivan Hurt, May 11 2019