OFFSET
1,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = A008284(3*n-1,n-1). - Hans Loeblich Apr 18 2019
EXAMPLE
The 4 partitions of 6 with parts <3:
2+2+2, 2+2+1+1, 2+1+1+1+1, 1+1+1+1+1+1.
Matching partitions of 2 into rationals as described:
2/3 + 2/3 + 2/3
2/3 + 2/3 + 1/3 + 1/3
2/3 + 1/3 + 1/3 + 1/3 + 1/3
1/3 + 1/3 + 1/3 + 1/3 + 1/3 + 1/3.
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(2*n, n-1):
seq(a(n), n=1..50); # Alois P. Heinz, Jul 09 2012
MATHEMATICA
f[n_] := Length[Select[IntegerPartitions[2 n], First[#] <= n - 1 &]]; Table[f[n], {n, 1, 34}] (* A209815 *)
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[2*n, n-1]; Table [a[n], {n, 1, 50}] (* Jean-François Alcover, Oct 28 2015, after Alois P. Heinz *)
PROG
(Haskell)
a209815 n = p [1..n-1] (2*n) where
p _ 0 = 1
p [] _ = 0
p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
-- Reinhard Zumkeller, Nov 14 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Mar 13 2012
EXTENSIONS
More terms from Alois P. Heinz, Jul 09 2012
STATUS
approved