OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
EXAMPLE
a(4) = (partitions of 7 into parts <= 4) = #{4+3, 4+2+1, 4+1+1+1, 3+3+1, 3+2+2, 3+2+1+1, 3+1+1+1+1, 2+2+2+1, 2+2+1+1+1, 2+1+1+1+1+1, 1+1+1+1+1+1+1} = 11.
MAPLE
g:= proc(n, i) option remember;
`if`(n=0, 1, `if`(i>1, g(n, i-1), 0)+`if`(i>n, 0, g(n-i, i)))
end:
a:= n-> g(2*n-1, n):
seq (a(n), n=1..40); # Alois P. Heinz, Jul 18 2012
MATHEMATICA
g[n_, i_] := g[n, i] = If[n==0, 1, If[i>1, g[n, i-1], 0]+If[i>n, 0, g[n-i, i]]]; a[n_] := g[2*n-1, n]; Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Feb 16 2017, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jan 21 2010
STATUS
approved