OFFSET
1,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
EXAMPLE
The 5 partitions of 9 with parts <3 are as follows:
2+2+2+2+1
2+2+2+1+1+1
2+2+1+1+1+1+1
2+1+1+1+1+1+1+1
1+1+1+1+1+1+1+1+1.
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1,
`if`(i<1, 0, b(n, i-1) +`if`(i>n, 0, b(n-i, i))))
end:
a:= n-> b(3*n, n-1):
seq(a(n), n=1..50); # Alois P. Heinz, Jul 09 2012
MATHEMATICA
f[n_] := Length[Select[IntegerPartitions[3 n], First[#] <= n - 1 &]]; Table[f[n], {n, 1, 25}] (* A209817 *)
b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-1] + If[i>n, 0, b[n-i, i]]]]; a[n_] := b[3*n, n-1]; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Oct 28 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Mar 13 2012
EXTENSIONS
More terms from Alois P. Heinz, Jul 09 2012
STATUS
approved