login
A335622
Number of integer-sided triangles with perimeter n such that the average of each pair of side lengths is prime.
1
0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 2, 0, 2, 0, 2, 0, 1, 0, 1, 0, 2, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 3, 0, 2, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 0, 2, 0, 3, 0, 2, 0, 1, 0, 1, 0, 1, 0, 2, 0
OFFSET
1,39
FORMULA
a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} sign(floor((i+k)/(n-i-k+1))) * chi((i+k)/2) * chi((i+k)/2) * chi((n-k)/2) * c((i+k)/2) * c((i+k)/2) * c((n-k)/2), where c is the prime characteristic (A010051) and chi(n) = 1 - ceiling(n) + floor(n).
MATHEMATICA
Table[Sum[Sum[(1 - Ceiling[(i + k)/2] + Floor[(i + k)/2]) (1 - Ceiling[(n - i)/2] + Floor[(n - i)/2]) (1 - Ceiling[(n - k)/2] + Floor[(n - k)/2]) (PrimePi[(i + k)/2] - PrimePi[(i + k)/2 - 1])*(PrimePi[(n - i)/2] - PrimePi[(n - i)/2 - 1])*(PrimePi[(n - k)/2] - PrimePi[(n - k)/2 - 1]) * Sign[Floor[(i + k)/(n - i - k + 1)]], {i, k, Floor[(n - k)/2]}], {k, Floor[n/3]}], {n, 100}]
CROSSREFS
Sequence in context: A320535 A174479 A134269 * A172444 A277146 A353460
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Oct 02 2020
STATUS
approved