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.

A334134 Number of integer-sided triangles with perimeter n whose side lengths can be written as the sum of two primes in the same number of ways.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 2, 1, 1, 0, 0, 1, 1, 2, 3, 3, 4, 5, 6, 6, 6, 5, 5, 4, 6, 4, 6, 5, 5, 6, 7, 6, 7, 6, 5, 6, 4, 4, 7, 5, 3, 6, 6, 7, 7, 9, 6, 8, 5, 6, 8, 7, 5, 6, 7, 5, 7, 5, 6, 4, 5, 3, 8, 4, 6, 6, 8, 7, 9, 9, 10, 7, 9, 8, 12, 6, 8, 7, 9, 6, 11, 6, 11, 9, 11, 6, 14
Offset: 1

Views

Author

Wesley Ivan Hurt, Apr 15 2020

Keywords

Examples

			a(4) = 0; no triangles can be made.
a(7) = 2; The two triangles [1,3,3] and [2,2,3] both have perimeter 7, and in each case, the side lengths can be written as the sum of two primes in the same number of ways (0 ways).
a(12) = 1; The triangle [4,4,4] has perimeter 12 and all of its side lengths can be written as the sum of two primes in the same number of ways (1 way).
a(15) = 3; the triangles [4,4,7], [4,5,6] and [5,5,5] all have perimeter 15. In each triangle, all the side lengths can be written as the sum of two primes in the same number of ways (1 way).
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[KroneckerDelta[Sum[(PrimePi[r] - PrimePi[r - 1]) (PrimePi[k - r] - PrimePi[k - r - 1]), {r, Floor[k/2]}], Sum[(PrimePi[s] - PrimePi[s - 1]) (PrimePi[i - s] - PrimePi[i - s - 1]), {s, Floor[i/2]}], Sum[(PrimePi[t] - PrimePi[t - 1]) (PrimePi[(n - i - k) - t] - PrimePi[(n - i - k) - t - 1]), {t, Floor[(n - i - k)/2]}]]*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))) * [c(i) = c(k) = c(n-i-k)], where [] is the Iverson bracket and c = A061358.