OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
FORMULA
O.g.f.: product_{i=1,2,...infinity} [1+x^A005117(i)]. - R. J. Mathar, May 16 2008
a(n) ~ exp(sqrt(2*n)) / (2^(1/4) * sqrt(Pi) * n^(3/4)). - Vaclav Kotesovec, Mar 24 2018
EXAMPLE
n=9: 5+3+1 = 6+2+1 = 6+3 = 7+2: a(9)=4;
n=10: 5+3+2 = 6+3+1 = 7+2+1 = 7+3 = 10: a(10)=5.
MAPLE
with(numtheory):
b:= proc(n, i) option remember;
`if`(i*(i+1)/2<n, 0, `if`(n=0, 1, b(n, i-1)+
`if`(i<=n and issqrfree(i), b(n-i, i-1), 0)))
end:
a:= n-> b(n$2):
seq(a(n), n=0..100); # Alois P. Heinz, Jun 02 2015
MATHEMATICA
b[n_, i_] := b[n, i] = If[i*(i+1)/2 < n, 0, If[n == 0, 1, b[n, i-1] + If[i <= n && SquareFreeQ[i], b[n-i, i-1], 0]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Jun 24 2015, after Alois P. Heinz *)
nmax = 100; CoefficientList[Series[Exp[Sum[(-1)^(j + 1)/j * Sum[Abs[MoebiusMu[k]] * x^(j*k), {k, 1, Floor[nmax/j] + 1}], {j, 1, nmax}]], {x, 0, nmax}], x] (* Vaclav Kotesovec, Mar 31 2018 *)
PROG
(Haskell)
a087188 = p a005117_list where
p _ 0 = 1
p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m
-- Reinhard Zumkeller, Jun 01 2015
(PARI) ok(v)=for(i=2, #v, if(v[i]==v[i-1] || !issquarefree(v[i]), return(0))); #v==0 || issquarefree(v[1])
a(n)=my(s, u); forpart(v=n, if(ok(v), s++)); s \\ Charles R Greathouse IV, Nov 05 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Aug 24 2003
EXTENSIONS
Offset changed and a(0)=1 prepended by Reinhard Zumkeller, Jun 01 2015
STATUS
approved