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!)
A335941 Number of partitions of n such that the set s of parts and multiplicities satisfies s = {1..max(s)}. 2

%I #21 May 30 2022 08:11:34

%S 1,1,2,1,1,4,2,5,5,9,8,15,11,14,22,28,30,36,37,53,60,80,83,104,114,

%T 148,157,201,218,283,284,362,400,455,518,624,697,807,907,1036,1181,

%U 1368,1531,1727,1990,2197,2563,2849,3182,3568,4095,4548,5143,5720,6420

%N Number of partitions of n such that the set s of parts and multiplicities satisfies s = {1..max(s)}.

%H Chai Wah Wu, <a href="/A335941/b335941.txt">Table of n, a(n) for n = 0..158</a> (n = 0..120 from Alois P. Heinz)

%e a(0) = 1: the empty partition.

%e a(1) = 1: 1.

%e a(2) = 2: 11, 2.

%e a(3) = 1: 21.

%e a(4) = 1: 211.

%e a(5) = 4: 2111, 221, 311, 32.

%e a(6) = 2: 2211, 321.

%e a(7) = 5: 22111, 2221, 3211, 322, 331.

%e a(8) = 5: 22211, 32111, 3221, 3311, 332.

%e a(9) = 9: 222111, 321111, 32211, 3222, 33111, 3321, 42111, 4311, 432.

%e a(10) = 8: 2221111, 322111, 32221, 331111, 33211, 4222, 4321, 433.

%p b:= proc(n,i,s) option remember;

%p `if`(n=0, `if`(s={$0..max(s)}, 1, 0), `if`(i<1, 0, add(

%p b(n-i*j, i-1, {s[], j, `if`(j=0, 0, i)}), j=0..n/i)))

%p end:

%p a:= n-> b(n, floor((sqrt(1+8*(n+1))-1)/2), {0}):

%p seq(a(n), n=0..55);

%t b[n_, i_, s_] := b[n, i, s] =

%t If[n == 0, If[s == Range[0, Max[s]], 1, 0], If[i < 1, 0, Sum[

%t b[n-i*j, i-1, Union@Flatten@{s, j, If[j == 0, 0, i]}], {j, 0, n/i}]]];

%t a[n_] := b[n, Floor[(Sqrt[1 + 8*(n + 1)] - 1)/2], {0}];

%t Table[a[n], {n, 0, 55}] (* _Jean-François Alcover_, May 30 2022, after _Alois P. Heinz_ *)

%Y Cf. A317081, A317088, A335942.

%K nonn

%O 0,3

%A _Alois P. Heinz_, Jun 30 2020

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 May 9 19:33 EDT 2024. Contains 372354 sequences. (Running on oeis4.)