A341074 Number of partitions of n into 5 distinct squarefree parts.
1, 1, 1, 0, 2, 3, 3, 3, 5, 8, 9, 8, 11, 15, 16, 16, 22, 27, 30, 31, 38, 46, 48, 49, 57, 72, 73, 76, 90, 107, 109, 112, 128, 151, 156, 160, 182, 214, 220, 224, 250, 290, 297, 306, 335, 387, 399, 409, 442, 503, 517, 529, 572, 641, 660, 676, 726, 809, 829, 846, 903
Offset: 17
Keywords
Crossrefs
Programs
-
Maple
b:= proc(n, i, t) option remember; `if`(n=0, `if`(t=0, 1, 0), `if`(i<1 or t<1, 0, b(n, i-1, t)+ `if`(numtheory[issqrfree](i), b(n-i, min(n-i, i-1), t-1), 0))) end: a:= n-> b(n$2, 5): seq(a(n), n=17..77); # Alois P. Heinz, Feb 04 2021
-
Mathematica
b[n_, i_, t_] := b[n, i, t] = If[n == 0, If[t == 0, 1, 0], If[i < 1 || t < 1, 0, b[n, i - 1, t] + If[SquareFreeQ[i], b[n - i, Min[n - i, i - 1], t - 1], 0]]]; a[n_] := b[n, n, 5]; Table[a[n], {n, 17, 77}] (* Jean-François Alcover, Jul 14 2021, after Alois P. Heinz *) Table[Count[IntegerPartitions[n,{5}],?(Length[Union[#]]==5&&AllTrue[#,SquareFreeQ]&)],{n,17,80}] (* _Harvey P. Dale, Sep 05 2023 *)