A308454 Number of integer-sided triangles with perimeter n whose largest side length is squarefree.
0, 0, 1, 0, 1, 1, 2, 1, 1, 0, 3, 2, 5, 4, 7, 5, 4, 3, 2, 1, 6, 5, 10, 9, 8, 7, 13, 11, 17, 15, 21, 18, 17, 14, 22, 19, 18, 15, 24, 20, 19, 16, 26, 22, 33, 29, 40, 36, 35, 31, 30, 26, 38, 35, 33, 30, 28, 25, 38, 35, 48, 45, 58, 54, 51, 48, 62, 58, 73, 69, 84
Offset: 1
Keywords
Examples
There exist A005044(11) = 4 integer-sided triangles with perimeter = 11; these four triangles have respectively sides: (1, 5, 5); (2, 4, 5); (3, 3, 5); (3, 4, 4). Only the last one: (3, 4, 4) has a largest side length = 4 that is not squarefree, so a(11) = 3. - _Bernard Schott_, Jan 24 2023
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
- Wikipedia, Integer Triangle
Programs
-
Maple
f:= proc(n) local p, v; v:= add(1/2*(3*p-n+1)+`if`((n-p)::even, 1/2, 0), p = select(numtheory:-issqrfree, [$ceil(n/3)..floor((n-1)/2)])); end proc: map(f, [$1..100]); # Robert Israel, Jan 16 2023
-
Mathematica
Table[Sum[Sum[ MoebiusMu[n - i - k]^2* Sign[Floor[(i + k)/(n - i - k + 1)]], {i, k, Floor[(n - k)/2]}], {k, Floor[n/3]}], {n, 100}]
Formula
a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} sign(floor((i+k)/(n-i-k+1))) * mu(n-i-k)^2, where mu is the Möbius function (A008683).