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.

A308318 Number of integer-sided triangles with perimeter n and at least one nonprime side length.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 0, 2, 2, 3, 2, 4, 4, 5, 4, 6, 7, 9, 8, 11, 10, 13, 11, 14, 14, 16, 15, 18, 19, 22, 21, 25, 24, 27, 26, 30, 30, 32, 32, 35, 37, 40, 40, 45, 44, 47, 47, 51, 52, 57, 56, 61, 61, 68, 65, 72, 70, 75, 74, 82, 80, 85, 84, 88, 91, 97, 96, 103
Offset: 1

Views

Author

Wesley Ivan Hurt, May 19 2019

Keywords

Crossrefs

Programs

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

Formula

a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} sign(floor((i+k)/(n-i-k+1))) * (1 - A010051(i) * A010051(k) * A010051(n-i-k)).
a(n) = A005044(n) - A070088(n).