OFFSET
1,15
LINKS
R. Zumkeller, Integer-sided triangles
FORMULA
EXAMPLE
For n=15 there are A005044(15)=7 integer triangles: [1,7,7], [2,6,7], [3,5,7], [3,6,6], [4,4,7], [4,5,6] and [5,5,5]: two of them consist of primes, therefore a(15)=2.
MATHEMATICA
triangleQ[sides_] := With[{s = Total[sides]/2}, AllTrue[sides, # < s&]];
a[n_] := Select[IntegerPartitions[n, {3}, Select[Range[Ceiling[n/2]], PrimeQ]], triangleQ] // Length; Array[a, 90] (* Jean-François Alcover, Jul 09 2017 *)
Table[Sum[Sum[(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}] (* Wesley Ivan Hurt, May 13 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, May 05 2002
STATUS
approved