login
A308318
Number of integer-sided triangles with perimeter n and at least one nonprime side length.
0
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,9
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).
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}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, May 19 2019
STATUS
approved