login
A308257
Take all the integer-sided triangles with perimeter n and nonprime sides a, b, and c such that a <= b <= c. a(n) is the sum of all the b's.
0
0, 0, 1, 0, 0, 0, 0, 0, 4, 0, 0, 4, 6, 4, 0, 6, 8, 12, 15, 14, 24, 31, 17, 35, 38, 45, 27, 49, 42, 71, 64, 76, 92, 118, 73, 117, 110, 149, 97, 146, 121, 194, 170, 217, 240, 294, 184, 277, 249, 339, 349, 389, 381, 502, 514, 566, 618, 693, 538, 658, 672, 764
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))) * A005171(i) * A005171(k) * A005171(n-i-k) * i.
MATHEMATICA
Table[Sum[Sum[i*(1 - PrimePi[i] + PrimePi[i - 1]) (1 - PrimePi[k] + PrimePi[k - 1]) (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
Cf. A005171.
Sequence in context: A096904 A375004 A375003 * A308256 A096406 A189885
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, May 17 2019
STATUS
approved