login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A229362 a(n) = n for n = 1, 2, 3; for n > 3: a(n) = number of partitions of n into preceding terms. 4

%I #12 Mar 12 2019 09:20:42

%S 1,2,3,4,6,10,12,17,21,29,34,47,55,71,84,107,124,156,180,221,256,310,

%T 355,428,488,578,660,775,879,1027,1160,1342,1516,1743,1958,2243,2513,

%U 2858,3198,3621,4037,4556,5065,5689,6316,7069,7824,8733,9644,10726,11827

%N a(n) = n for n = 1, 2, 3; for n > 3: a(n) = number of partitions of n into preceding terms.

%H Alois P. Heinz, <a href="/A229362/b229362.txt">Table of n, a(n) for n = 1..10000</a>

%e a(4) = #{3+1, 2+2, 2+1+1, 1+1+1+1} = 4 < A000041(4) = 5;

%e a(5) = #{4+1, 3+2, 3+1+1, 2+2+1, 2+1+1+1, 5x1} = 6 < A000041(5) = 7;

%e 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;

%e 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.

%t a[n_] := a[n] = If[n<4, n, IntegerPartitions[n, All, Array[a, n-1]] // Length];

%t Table[Print[n, " ", a[n]]; a[n], {n, 1, 100}] (* _Jean-François Alcover_, Mar 12 2019 *)

%o (Haskell)

%o a229362 n = a229362_list !! (n-1)

%o a229362_list = 1 : 2 : 3 : f 4 [1,2,3] where

%o f x ys = y : f (x + 1) (ys ++ [y]) where y = p ys x

%o p _ 0 = 1

%o p [] _ = 0

%o p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m

%Y Cf. A000041, A007279.

%K nonn

%O 1,2

%A _Reinhard Zumkeller_, Sep 21 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 13:12 EDT 2024. Contains 371969 sequences. (Running on oeis4.)