login
Number of partitions of n into 3 parts (r,s,t) such that n | (r^2 + s^2 + t^2).
0

%I #6 Oct 22 2021 20:57:15

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

%T 1,3,6,12,7,1,0,14,7,0,1,0,0,6,11,8,1,8,0,12,0,17,10,0,0,2,10,20,10,5,

%U 2,2,11,0,1,4,0,12,12,24,9,12,1,26,13,1,7,0,0,14,0,28,1,1

%N Number of partitions of n into 3 parts (r,s,t) such that n | (r^2 + s^2 + t^2).

%H <a href="/index/Par#part">Index entries for sequences related to partitions</a>

%F a(n) = Sum_{j=1..floor(n/3)} Sum_{i=j..floor((n-j)/2)} c((j^2 + i^2 + (n-i-j)^2)/n), where c(n) = 1 - ceiling(n) + floor(n).

%e a(6) = 2; 6 | (1^2 + 1^2 + 4^2) = 18 and 6 | (2^2 + 2^2 + 2^2) = 12, so a(6) = 2.

%t c[n_] := 1 - Ceiling[n] + Floor[n]; a[n_] := Sum[c[(j^2 + i^2 + (n - i - j)^2)/n], {j, 1, Floor[n/3]}, {i, j, Floor[(n - j)/2]}]; Array[a, 100] (* _Amiram Eldar_, Oct 22 2021 *)

%Y Cf. A069905.

%K nonn

%O 1,6

%A _Wesley Ivan Hurt_, Oct 21 2021