login
Sum of the largest side lengths of all integer-sided triangles with squarefree side lengths and perimeter n.
1

%I #20 Aug 24 2020 14:22:59

%S 0,0,1,0,2,2,6,3,3,0,10,5,17,12,32,20,20,13,14,7,27,30,64,43,32,21,71,

%T 48,92,92,154,112,110,85,169,123,142,94,222,154,171,101,245,169,316,

%U 250,424,321,361,263,322,219,367,337,348,260,275,242,405,310

%N Sum of the largest side lengths of all integer-sided triangles with squarefree side lengths and perimeter n.

%H Robert Israel, <a href="/A308140/b308140.txt">Table of n, a(n) for n = 1..10000</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))) * mu(i)^2 * mu(k)^2 * mu(n-i-k)^2 * (n-i-k), where mu is the Möbius function (A008683).

%p N:= 100: # for a(1)..a(N)

%p SF:= select(numtheory:-issqrfree, [$1..N/2]):

%p V:= Vector(N):

%p for ia from 1 to nops(SF) do

%p a:= SF[ia];

%p if 2*a >= N then break fi;

%p for ib from ia by -1 to 1 do

%p b:= SF[ib];

%p if 2*b <= a then break fi;

%p cs:= select(c -> b+c > a, SF[1...ib]);

%p P:= select(`<=`,map(c -> a+b+c, cs),N);

%p V[P]:= V[P] +~ a;

%p od od:

%p convert(V,list); # _Robert Israel_, May 14 2019

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

%o (PARI) a(n) = sum(k=1, n\3, sum(i=k, (n-k)\2, sign((i+k)\(n-i-k+1))* issquarefree(i)*issquarefree(k)*issquarefree(n-i-k)*(n-i-k))); \\ _Michel Marcus_, May 14 2019

%Y Cf. A008683, A308061, A308116.

%K nonn,look

%O 1,5

%A _Wesley Ivan Hurt_, May 14 2019