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!)
A232534 Number of subsets of {1,...,n} containing n and having at least one set partition into 3 blocks with equal element sum. 3

%I #22 May 25 2018 03:07:44

%S 0,0,0,0,1,2,5,12,29,63,146,329,722,1613,3505,7567,16119,34194,71455,

%T 148917,307432,631816,1290905,2628736,5330368

%N Number of subsets of {1,...,n} containing n and having at least one set partition into 3 blocks with equal element sum.

%C Subsets with more than one set partition into 3 blocks with equal element sum are counted only once: {1,2,3,4,5,6,7,8}-> 1236/48/57, 138/246/57, 156/237/48.

%e a(5) = 1: {1,2,3,4,5}-> 14/23/5.

%e a(6) = 2: {1,2,4,5,6}-> 15/24/6, {1,2,3,4,5,6}-> 16/25/34.

%e a(7) = 5: {2,3,4,5,7}-> 25/34/7, {1,3,4,6,7}-> 16/34/7, {1,2,5,6,7}-> 16/25/7, {1,2,3,5,6,7}-> 17/26/35, {2,3,4,5,6,7}-> 27/36/45.

%e a(8) = 12: {2,3,5,6,8}, {1,3,5,7,8}, {1,2,6,7,8}, {2,3,4,6,7,8}, {1,2,3,4,5,7,8}, {1,3,4,5,6,8}, {1,2,4,5,6,7,8}, {1,2,3,6,7,8}, {3,4,5,6,7,8}, {1,2,4,5,7,8}, {1,2,3,4,5,6,7,8}, {1,2,3,4,6,8}.

%p b:= proc(n, k, i) option remember; local m; m:= i*(i+1)/2;

%p `if`(k>n, b(k, n, i), `if`(i<1, `if`(n=0 and k=0, {0}, {}),

%p `if`(k>=0 and n+k>m or k<0 and n-2*k>m, {}, b(n, k, i-1)

%p union map(p-> p+x^i, b(n+i, k+i, i-1) union b(n-i, k, i-1)

%p union b(n, k-i, i-1)))))

%p end:

%p a:= n-> nops(b(n, n, n-1)):

%p seq(a(n), n=1..15);

%t b[n_, k_, i_] := b[n, k, i] = Module[{m = i*(i + 1)/2}, If[k > n, b[k, n, i], If[i < 1, If[n == 0 && k == 0, {0}, {}], If[k >= 0 && n + k > m || k < 0 && n - 2*k > m, {}, b[n, k, i - 1] ~Union~ Map[# + x^i &, b[n + i, k + i, i - 1] ~Union~ b[n - i, k, i - 1] ~Union~ b[n, k - i, i - 1]]]]]];

%t a[n_] := Length[b[n, n, n - 1]];

%t Table[a[n], {n, 1, 20}] (* _Jean-François Alcover_, May 25 2018, translated from Maple *)

%Y Cf. A164934, A232466 (2 blocks).

%Y Column k=3 of A248112.

%K nonn,more

%O 1,6

%A _Alois P. Heinz_, Nov 25 2013

%E a(25) from _Alois P. Heinz_, Mar 26 2016

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 16 08:27 EDT 2024. Contains 371698 sequences. (Running on oeis4.)