A262991 Number of squarefree numbers among the parts of the partitions of n into two parts.
0, 2, 2, 4, 3, 5, 5, 6, 6, 7, 7, 9, 8, 10, 10, 11, 11, 12, 12, 14, 13, 15, 15, 16, 16, 17, 17, 18, 17, 19, 19, 20, 20, 22, 22, 23, 23, 25, 25, 26, 26, 28, 28, 30, 29, 30, 30, 31, 31, 31, 31, 33, 32, 33, 33, 34, 34, 36, 36, 38, 37, 39, 39, 39, 39, 41, 41, 43
Offset: 1
Examples
a(5)=3; there are 2 partitions of 5 into two parts: (4,1) and (3,2). Three of the parts in the partitions are squarefree, so a(5)=3. a(6)=5; there are 3 partitions of 6 into two parts: (5,1), (4,2) and (3,3). Five of the parts in the partitions are squarefree, so a(6)=5.
Programs
-
Maple
with(numtheory): A262991:=n->add(mobius(i)^2+mobius(n-i)^2, i=1..floor(n/2)): seq(A262991(n), n=1..100);
-
Mathematica
Table[Sum[MoebiusMu[i]^2 + MoebiusMu[n - i]^2, {i, Floor[n/2]}], {n, 100}] Table[Count[Flatten[IntegerPartitions[n,{2}]],?SquareFreeQ],{n,70}] (* _Harvey P. Dale, Aug 18 2021 *)
-
PARI
vector(100, n, sum(k=1, n\2, moebius(k)^2 + moebius(n-k)^2)) \\ Altug Alkan, Oct 07 2015