OFFSET
0,3
COMMENTS
Also number of partitions of n such that if k is the largest part, then k and all integers from 1 to some integer m, 0<=m<k, occur any number of times (if m = 0, then partition consists only of k's). Example: a(5)=6 because we have [5], [4,1], [3,1,1], [2,2,1], [2,1,1,1] and [1,1,1,1,1] ([3,2] does not qualify). - Emeric Deutsch, Apr 19 2006
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
FORMULA
G.f.: 1+Sum_{k>=1} x^k/(1-x^k)*Product_{i>=k+1} (1+x^i).
G.f.: 1+Sum_{k>=1} (x^k/(1-x^k)) * Sum_{m=0..k-1} x^(m*(m+1)/2) / Product_{i=1..m} (1-x^i). - Emeric Deutsch, Apr 19 2006
EXAMPLE
a(5) = 6 because we have [5], [4,1], [3,2], [3,1,1], [2,1,1,1] and [1,1,1,1,1] ([2,2,1] does not qualify).
MAPLE
g:=1+sum(x^k/(1-x^k)*product(1+x^i, i=k+1..90), k=1..90): gser:=series(g, x=0, 50): seq(coeff(gser, x, n), n=0..44); # Emeric Deutsch, Apr 19 2006
# second Maple program:
b:= proc(n, i) option remember; `if`(n=0 or i=1, 1, b(n, i-1)+
`if`(irem(n, i)=0, 1, 0)+`if`(n>i, b(n-i, i-1), 0))
end:
a:= n-> b(n$2):
seq(a(n), n=0..50); # Alois P. Heinz, Feb 03 2019
MATHEMATICA
b[n_, i_] := b[n, i] = If[n == 0 || i == 1, 1, b[n, i - 1] + If[Mod[n, i] == 0, 1, 0] + If[n > i, b[n - i, i - 1], 0]];
a[n_] := b[n, n];
a /@ Range[0, 50] (* Jean-François Alcover, Nov 21 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Vladeta Jovovic, Feb 25 2006; corrected Mar 05 2006
EXTENSIONS
a(0)=1 prepended by Alois P. Heinz, Feb 03 2019
STATUS
approved