OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
EXAMPLE
a(4) = #{3+1, 2+2, 2+1+1, 1+1+1+1} = 4 < A000041(4) = 5;
a(5) = #{4+1, 3+2, 3+1+1, 2+2+1, 2+1+1+1, 5x1} = 6 < A000041(5) = 7;
a(6) = #{6, 4+2, 4+1+1, 3+3, 3+2+1, 3+1+1+1, 2+2+2, 2+2+1+1, 2+4x1, 6x1} = 10 < A000041(6) = 11;
a(7) = #{6+1, 4+3, 4+2+1, 4+1+1+1, 3+3+1, 3+2+2, 3+2+1+1, 3+4x1, 2+2+2+1, 2+2+1+1+1, 2+5x1, 7x1} = 12 < A000041(7) = 15.
MATHEMATICA
a[n_] := a[n] = If[n<4, n, IntegerPartitions[n, All, Array[a, n-1]] // Length];
Table[Print[n, " ", a[n]]; a[n], {n, 1, 100}] (* Jean-François Alcover, Mar 12 2019 *)
PROG
(Haskell)
a229362 n = a229362_list !! (n-1)
a229362_list = 1 : 2 : 3 : f 4 [1, 2, 3] where
f x ys = y : f (x + 1) (ys ++ [y]) where y = p ys x
p _ 0 = 1
p [] _ = 0
p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Sep 21 2013
STATUS
approved