A202261
Number of n-element subsets that can be chosen from {1,2,...,2*n} having element sum n^2.
Original entry on oeis.org
1, 1, 1, 3, 7, 18, 51, 155, 486, 1555, 5095, 17038, 57801, 198471, 689039, 2415043, 8534022, 30375188, 108815273, 392076629, 1420064031, 5167575997, 18885299641, 69287981666, 255121926519, 942474271999, 3492314839349, 12977225566680, 48349025154154
Offset: 0
a(0) = 1: {}.
a(1) = 1: {1}.
a(2) = 1: {1,3}.
a(3) = 3: {1,2,6}, {1,3,5}, {2,3,4}.
a(4) = 7: {1,2,5,8}, {1,2,6,7}, {1,3,4,8}, {1,3,5,7}, {1,4,5,6}, {2,3,4,7},{2,3,5,6}.
-
b:= proc(n, i, t) option remember;
`if`(it*(2*i-t+1)/2, 0,
`if`(n=0, 1, b(n, i-1, t) +`if`(n b(n^2, 2*n, n):
seq(a(n), n=0..30);
-
b[n_, i_, t_] := b[n, i, t] = If[it*(2*i-t+1)/2, 0, If[n == 0, 1, b[n, i-1, t] + If[nJean-François Alcover, Feb 05 2015, after Alois P. Heinz *)
A186730
Number of n-element subsets that can be chosen from {1,2,...,2*n^2} having element sum n^3.
Original entry on oeis.org
1, 1, 3, 36, 785, 26404, 1235580, 74394425, 5503963083, 484133307457, 49427802479445, 5750543362215131, 751453252349649771, 109016775078856564392, 17391089152542558703435, 3026419470005398093836960, 570632810506646981058828349, 115900277419940965862120360831
Offset: 0
a(0) = 1: {}.
a(1) = 1: {1}.
a(2) = 3: {1,7}, {2,6}, {3,5}.
-
b:= proc(n, i, t) option remember;
`if`(it*(2*i-t+1)/2, 0,
`if`(n=0, 1, b(n, i-1, t) +`if`(n b(n^3, 2*n^2, n):
seq(a(n), n=0..12);
-
$RecursionLimit = 2000;
b[n_, i_, t_] := b[n, i, t] = If[it (2i-t+1)/2, 0, If[n==0, 1, b[n, i-1, t] + If[nJean-François Alcover, Dec 05 2020, after Alois P. Heinz *)
A185062
Number of n-element subsets that can be chosen from {1,2,...,2*n^3} having element sum n^4.
Original entry on oeis.org
1, 1, 7, 351, 56217, 18878418, 11163952389, 10292468330630, 13703363417260677, 24932632800863823135, 59509756600504616529186, 180533923700628895521591343, 678854993880375551144618682344, 3100113915888360851262910882014885
Offset: 0
a(0) = 1: {}.
a(1) = 1: {1}.
a(2) = 7: {1,15}, {2,14}, {3,13}, {4,12}, {5,11}, {6,10}, {7,9}.
-
b:= proc(n, i, t) option remember;
`if`(it*(2*i-t+1)/2, 0,
`if`(n=0, 1, b(n, i-1, t) +`if`(n b(n^4, 2*n^3, n):
seq(a(n), n=0..5);
-
$RecursionLimit = 10000;
b[n_, i_, t_] := b[n, i, t] =
If[i < t || n < t(t+1)/2 || n > t(2i - t + 1)/2, 0,
If[n == 0, 1, b[n, i-1, t] + If[n < i, 0, b[n-i, i-1, t-1]]]];
a[n_] := b[n^4, 2 n^3, n];
Table[Print[n, " ", a[n]]; a[n], {n, 0, 10}] (* Jean-François Alcover, Mar 05 2021, after Alois P. Heinz *)
Showing 1-3 of 3 results.
Comments