login
Number of partitions of 2*n into two parts, (s,t), such that at least one of s+-1 or t+-1 is a square > 0.
0

%I #5 Sep 23 2020 16:09:30

%S 0,1,2,2,3,4,5,5,4,5,6,7,7,8,9,7,7,8,9,9,10,11,11,11,9,10,12,12,11,12,

%T 13,13,13,13,14,13,13,14,14,13,14,16,17,16,15,16,17,17,15,15,16,16,16,

%U 18,19,19,18,17,18,19,19,20,21,18,17,19,20,19,20,21,21,20,19,20,22

%N Number of partitions of 2*n into two parts, (s,t), such that at least one of s+-1 or t+-1 is a square > 0.

%F a(n) = Sum_{i=2..n} sign( c(i-1) + c(i+1) + c(2*n-i-1) + c(2*n-i+1) ), where c is the square characteristic (A010052).

%e a(6) = 4; There are 6 partitions of 2*6 = 12 into two parts, (11,1), (10,2), (9,3), (8,4), (7,5) and (6,6). Since 10-1 = 9 (square), 3+1 = 4 (square), 8+1 = 9 (square), and 5-1 = 4 (square), then a(6) = 4.

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

%Y Cf. A010052.

%K nonn

%O 1,3

%A _Wesley Ivan Hurt_, Sep 19 2020