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!)
A295946 Number of set partitions of [3n] into n subsets of size three such that all element sums are triangular numbers. 1

%I #10 Mar 08 2021 06:17:30

%S 1,1,1,2,17,149,1439,16993,373393,6899469,214746442,7287992421

%N Number of set partitions of [3n] into n subsets of size three such that all element sums are triangular numbers.

%e a(0) = 1: {}.

%e a(1) = 1: {{1,2,3}}.

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

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

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

%p b:= proc(s) option remember; `if`(s={}, 1, (j->

%p add(add(`if`(i<j and k<i and issqr((k+i+j)*8+1),

%p b(s minus {k, i, j}), 0), k=s), i=s))(max(s)))

%p end:

%p a:= n-> b({$1..3*n}):

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

%t b[s_] := b[s] = If[s == {}, 1, With[{j = Max[s]},

%t Sum[Sum[If[i < j && k < i && IntegerQ@Sqrt[(k + i + j)*8 + 1],

%t b[s ~Complement~ {k, i, j}], 0], {k, s}], {i, s}]]];

%t a[n_] := b[Range[3n]];

%t Table[Print[n, " ", a[n]]; a[n], {n, 0, 9}] (* _Jean-François Alcover_, Mar 08 2021, after _Alois P. Heinz_ *)

%Y Cf. A000217, A278329.

%K nonn,more

%O 0,4

%A _Alois P. Heinz_, Nov 30 2017

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 23 11:13 EDT 2024. Contains 371905 sequences. (Running on oeis4.)