login
A294234
Number of partitions of n into two parts such that the smaller part is nonsquarefree.
1
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13
OFFSET
0,17
FORMULA
a(n) = Sum_{i=1..floor(n/2)} (1 - mu(i)^2), where mu is the Möbius function (A008683).
a(2*n) = a(2*n + 1) for n >= 0. - David A. Corneth, Oct 25 2017
EXAMPLE
The nonsquarefree numbers up to 10 are 4, 8 and 9. So a(n) = 0 for n = 0 to 2*4 - 1 = 7, a(n) = 1 for n = 2*4 to 2*8 - 1, a(n) = 2 for n = 2*8 = 16 to 2*9 - 1 = 17. We haven't filled anything in yet for n = 18 to 2 * 10 = so a(n) = 3 for n = 18 to 20. We haven't checked for nonsquarefree numbers up for n > 10 so stop here. - David A. Corneth, Oct 25 2017
MATHEMATICA
Table[Sum[(1 - MoebiusMu[k]^2), {k, Floor[n/2]}], {n, 200}]
Table[Count[IntegerPartitions[n, {2}], _?(!SquareFreeQ[#[[2]]]&)], {n, 0, 80}] (* Harvey P. Dale, Sep 18 2021 *)
PROG
(PARI) first(n) = {my(res = vector(n), nsqrfr = List(), t = 0); for(i = 2, sqrtint(n\2), for(k = 1, (n\2) \ i^2, listput(nsqrfr, k * i^2))); listsort(nsqrfr, 1); for(i = 1, #nsqrfr, for(j = t, nsqrfr[i] - 1, for(k = 1, 2, res[2*j + k] = i-1)); t = nsqrfr[i]); for(i=2*t+1, n, res[i] = res[2*t] + 1); res} \\ David A. Corneth, Oct 25 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Oct 25 2017
STATUS
approved