login
Number of integer-sided triangles with perimeter n whose smallest side-length divides n.
3

%I #72 Dec 23 2021 04:20:38

%S 0,0,1,0,1,1,1,1,2,1,1,3,1,1,4,3,1,3,1,5,4,1,1,8,4,1,4,6,1,8,1,7,4,1,

%T 8,12,1,1,4,14,1,9,1,8,12,1,1,18,5,8,4,9,1,10,10,17,4,1,1,28,1,1,13,

%U 15,11,11,1,11,4,18,1,31,1,1,15,12,11,12,1,32

%N Number of integer-sided triangles with perimeter n whose smallest side-length divides n.

%H Antti Karttunen, <a href="/A307828/b307828.txt">Table of n, a(n) for n = 1..10220</a>

%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 - ceiling(n/k) + floor(n/k)).

%t Table[Sum[Sum[(1 - Ceiling[n/k] + Floor[n/k]) Sign[Floor[(i + k)/(n - i - k + 1)]], {i, k, Floor[(n - k)/2]}], {k, Floor[n/3]}], {n, 100}]

%o (PARI) A307828(n) = sum(k=1,floor(n/3), sum(i=k,floor((n-k)/2), sign(floor((i+k)/(n-i-k+1)) * (1 - ceil(n/k) + floor(n/k))))); \\ _Antti Karttunen_, Dec 05 2021

%Y Cf. A005044.

%K nonn

%O 1,9

%A _Wesley Ivan Hurt_, May 15 2019