OFFSET
1,6
LINKS
Wikipedia, Integer Triangle
FORMULA
a(n) = n * Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} sign(floor((i+k)/(n-i-k+1))) * ([i = k] + [i = n-i-k] - [k = n-i-k]) * c(i) * c(k) * c(n-i-k), where c is the prime characteristic (A010051) and [] is the Iverson bracket.
MATHEMATICA
Table[n*Sum[Sum[(PrimePi[i] - PrimePi[i - 1]) (PrimePi[k] - PrimePi[k - 1]) (PrimePi[n - i - k] - PrimePi[n - i - k - 1]) (KroneckerDelta[i, k] + KroneckerDelta[i, n - i - k] - KroneckerDelta[k, n - i - k]) 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 14 2019
STATUS
approved