OFFSET
1,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
FORMULA
a(n) ~ exp(Pi*sqrt(2*n/3))*(2*gamma - 2 + log(6*n/Pi^2))/(8*sqrt(3)*n), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Oct 24 2016
G.f.: Sum_{k>=1} x^(2*k)/(1 - x^k) / Product_{j>=2} (1 - x^j). - Ilya Gutkovskiy, Mar 05 2021
MAPLE
b:= proc(n, i) option remember; local f, g;
if n=0 or i=1 then [1, 0]
else f:= b(n, i-1); g:= `if`(i>n, [0, 0], b(n-i, i));
[f[1]+g[1], f[2]+g[2]+`if`(i>1, g[1], 0)]
fi
end:
a:= n-> b(n, n)[2]-b(n-1, n-1)[2]:
seq (a(n), n=1..60); # Alois P. Heinz, Apr 04 2012
MATHEMATICA
a[n_] := DivisorSigma[0, n] - 1 + Sum[(DivisorSigma[0, k] - 1)*(PartitionsP[n - k] - PartitionsP[n - k - 1]), {k, 1, n - 1}]; Table[a[n], {n, 1, 42}] (* Jean-François Alcover, Jan 14 2013, from 1st formula *)
Table[Length@Flatten@Select[IntegerPartitions[n], FreeQ[#, 1] &], {n, 1, 42}] (* Robert Price, May 01 2020 *)
PROG
(PARI) a(n)=numdiv(n)-1+sum(k=1, n-1, (numdiv(k)-1)*(numbpart(n-k) - numbpart(n-k-1))) \\ Charles R Greathouse IV, Jan 14 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Omar E. Pol, Mar 30 2008
STATUS
approved