login
Concatenate subsequences [2^0, 2^1, ..., 2^n] for n = 0, 1, 2, ...
24

%I #54 Feb 25 2025 05:12:11

%S 1,1,2,1,2,4,1,2,4,8,1,2,4,8,16,1,2,4,8,16,32,1,2,4,8,16,32,64,1,2,4,

%T 8,16,32,64,128,1,2,4,8,16,32,64,128,256,1,2,4,8,16,32,64,128,256,512,

%U 1,2,4,8,16,32,64,128,256,512,1024,1,2,4,8,16,32,64,128,256,512,1024,2048

%N Concatenate subsequences [2^0, 2^1, ..., 2^n] for n = 0, 1, 2, ...

%C Triangular array T(n,k) read by rows, where T(n,k) = i!*j! times coefficient of x^n*y^k in exp(x+2y).

%C T(n,k) is the number of subsets of {0,1,...,n} whose largest element is k. To see this, let A be any subset of the 2^k subsets of {0,1,...,k-1}. Then there are 2^k subsets of the form (A U {k}). See example below. - _Dennis P. Walsh_, Nov 27 2011

%C Sequence B is called a reluctant sequence of sequence A, if B is triangle array read by rows: row number k coincides with first k elements. A059268 is reluctant sequence of sequence A000079. - _Boris Putievskiy_, Dec 17 2012

%H Reinhard Zumkeller, <a href="/A059268/b059268.txt">Rows n = 0..150 of triangle, flattened</a>

%H J. L. Arregui, <a href="https://arxiv.org/abs/math/0109108">Tangent and Bernoulli numbers related to Motzkin and Catalan numbers by means of numerical triangles</a>, arXiv:math/0109108 [math.NT], 2001.

%H Boris Putievskiy, <a href="http://arxiv.org/abs/1212.2732">Transformations Integer Sequences And Pairing Functions</a> arXiv:1212.2732 [math.CO], 2012.

%F E.g.f.: exp(x+2*y) (T coordinates).

%F a(n) = A018900(n+1) - A140513(n). - _Reinhard Zumkeller_, Jun 24 2009

%F T(n,k) = A173786(n-1,k-1) - A173787(n-1,k-1), 0<k<=n. - _Reinhard Zumkeller_, Feb 28 2010

%F T(n,k) = 2^k. - _Reinhard Zumkeller_, Jan 29 2010

%F As a linear array, the sequence is a(n) = 2^(n-1-t*(t+1)/2), where t = floor((-1+sqrt(8*n-7))/2), n>=1. - _Boris Putievskiy_, Dec 17 2012

%F As a linear array, the sequence is a(n) = 2^(n-1-t*(t+1)/2), where t = floor(sqrt(2*n)-1/2), n>=1. - _Zhining Yang_, Jun 09 2017

%e T(4,3)=8 since there are 8 subsets of {0,1,2,3,4} whose largest element is 3, namely, {3}, {0,3}, {1,3}, {2,3}, {0,1,3}, {0,2,3}, {1,2,3}, and {0,1,2,3}.

%e Triangle starts:

%e 1;

%e 1, 2;

%e 1, 2, 4;

%e 1, 2, 4, 8;

%e 1, 2, 4, 8, 16;

%e 1, 2, 4, 8, 16, 32;

%e ...

%p seq(seq(2^k,k=0..n),n=0..10);

%t Table[2^k, {n, 0, 11}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Jun 10 2013 *)

%o (Haskell)

%o a059268 n k = a059268_tabl !! n !! k

%o a059268_row n = a059268_tabl !! n

%o a059268_tabl = iterate (scanl (+) 1) [1]

%o -- _Reinhard Zumkeller_, Apr 18 2013, Jul 05 2012

%o (Python)

%o from math import isqrt

%o def A059268(n):

%o a = (m:=isqrt(k:=n+1<<1))-(k<=m*(m+1))

%o return 1<<n-((a+1)*a>>1) # _Chai Wah Wu_, Feb 24 2025

%Y Cf. A140531.

%Y Cf. A000079.

%Y Cf. A131816.

%Y Row sums give A126646.

%K nonn,tabl,easy,changed

%O 0,3

%A _N. J. A. Sloane_, Jan 23 2001

%E Formula corrected by _Reinhard Zumkeller_, Feb 23 2010