OFFSET
0,6
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000 (first 1001 terms from Rémy Sigrist)
FORMULA
a(n) = [x^n y^3] Product_{k>=1} 1/(1 - mu(k)^2*y*x^k).
a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} mu(i)^2 * mu(k)^2 * mu(n-i-k)^2, where mu is the Mobius function. - Wesley Ivan Hurt, May 09 2019
EXAMPLE
a(10) = 4 because we have [7, 2, 1], [6, 3, 1], [6, 2, 2] and [5, 3, 2].
MAPLE
b:= proc(n, i) option remember; `if`(n=0, [1, 0$3], `if`(i<1, 0, b(n, i-1)+
`if`(numtheory[issqrfree](i), [0, b(n-i, min(i, n-i))[1..3][]], 0)))
end:
a:= n-> b(n$2)[4]:
seq(a(n), n=0..80); # Alois P. Heinz, Apr 30 2019
MATHEMATICA
Array[Count[IntegerPartitions[#, {3}], _?(AllTrue[#, SquareFreeQ] &)] &, 75, 0]
(* Second program: *)
b[n_, i_] := b[n, i] = If[n == 0, {1, 0, 0, 0}, If[i < 1, {0, 0, 0, 0}, b[n, i - 1] + If[SquareFreeQ[i], {0, Sequence @@ b[n - i, Min[i, n - i]][[1 ;; 3]]}, {0, 0, 0, 0}]]];
a[n_] := b[n, n][[4]];
a /@ Range[0, 80] (* Jean-François Alcover, Jun 06 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Apr 30 2019
STATUS
approved