login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of integer-sided triangles with perimeter n and at least one nonprime side length.
0

%I #6 Jun 18 2020 13:57:04

%S 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,

%T 19,22,21,25,24,27,26,30,30,32,32,35,37,40,40,45,44,47,47,51,52,57,56,

%U 61,61,68,65,72,70,75,74,82,80,85,84,88,91,97,96,103

%N Number of integer-sided triangles with perimeter n and at least one nonprime side length.

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Integer_triangle">Integer Triangle</a>

%F 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)).

%F a(n) = A005044(n) - A070088(n).

%t 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}]

%Y Cf. A005044, A010051, A070088.

%K nonn

%O 1,9

%A _Wesley Ivan Hurt_, May 19 2019