login
Triangle read by rows; n-th row contains the lexicographically first set of n distinct positive integers whose sum is 2^n.
2

%I #29 Mar 16 2024 13:08:32

%S 2,1,3,1,2,5,1,2,3,10,1,2,3,4,22,1,2,3,4,5,49,1,2,3,4,5,6,107,1,2,3,4,

%T 5,6,7,228,1,2,3,4,5,6,7,8,476,1,2,3,4,5,6,7,8,9,979,1,2,3,4,5,6,7,8,

%U 9,10,1993,1,2,3,4,5,6,7,8,9,10,11,4030

%N Triangle read by rows; n-th row contains the lexicographically first set of n distinct positive integers whose sum is 2^n.

%H Robert Israel, <a href="/A080521/b080521.txt">Table of n, a(n) for n = 1..10011</a> (rows 1 to 141, flattened)

%F From _Jon E. Schoenfield_, Jul 30 2017: (Start)

%F T(n,k) = k for 1 <= k < n;

%F T(n,n) = 2^n - n(n-1)/2. (End)

%F G.f.: x*y*(2 - x - 7*x*y + 4*x^2*y + 8*x^2*y^2 - 6*x^3*y^2 - 2*x^3*y^3 + 2*x^4*y^3)/((1-x*y)^3*(1-x)*(1-2*x*y)). - _Robert Israel_, Jul 04 2019

%e Triangle begins

%e 2;

%e 1, 3;

%e 1, 2, 5;

%e 1, 2, 3, 10;

%e 1, 2, 3, 4, 22;

%e 1, 2, 3, 4, 5, 49;

%p for n from 1 to 20 do

%p seq(k,k=1..n-1),2^n-n*(n-1)/2

%p od; # _Robert Israel_, Jul 04 2019

%t Array[Join[Range[# - 1], {2^# - #*(# - 1)/2}] &, 15] // Flatten (* _Paolo Xausa_, Mar 16 2024 *)

%o (PARI) print(2, ";");for(i=2,20,s=0;for(j=1,i-1,print1(j,", ");s+=j);print(2^i-s, "; ")) \\ Lambert Klasen (Lambert.Klasen(AT)gmx.net), Jul 19 2005

%Y Cf. A080522.

%Y First diagonal is A014844 (2^n - n(n-1)/2).

%K nonn,tabl

%O 1,1

%A _Amarnath Murthy_, Mar 21 2003

%E More terms from Lambert Klasen (Lambert.Klasen(AT)gmx.net), Jul 19 2005

%E T(1,1) = 2 inserted by _Jon E. Schoenfield_ and _Michel Marcus_, Jul 30 2017