cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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, 8, 16, 32, 64, 128, 1, 2, 4, 8, 16, 32, 64, 128, 256, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048
Offset: 0

Views

Author

N. J. A. Sloane, Jan 23 2001

Keywords

Comments

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).
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
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

Examples

			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}.
Triangle starts:
  1;
  1, 2;
  1, 2, 4;
  1, 2, 4, 8;
  1, 2, 4, 8, 16;
  1, 2, 4, 8, 16, 32;
  ...
		

Crossrefs

Cf. A140531.
Cf. A000079.
Cf. A131816.
Row sums give A126646.

Programs

  • Haskell
    a059268 n k = a059268_tabl !! n !! k
    a059268_row n = a059268_tabl !! n
    a059268_tabl = iterate (scanl (+) 1) [1]
    -- Reinhard Zumkeller, Apr 18 2013, Jul 05 2012
    
  • Maple
    seq(seq(2^k,k=0..n),n=0..10);
  • Mathematica
    Table[2^k, {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 10 2013 *)
  • Python
    from math import isqrt
    def A059268(n):
        a = (m:=isqrt(k:=n+1<<1))-(k<=m*(m+1))
        return 1<>1) # Chai Wah Wu, Feb 24 2025

Formula

E.g.f.: exp(x+2*y) (T coordinates).
a(n) = A018900(n+1) - A140513(n). - Reinhard Zumkeller, Jun 24 2009
T(n,k) = A173786(n-1,k-1) - A173787(n-1,k-1), 0Reinhard Zumkeller, Feb 28 2010
T(n,k) = 2^k. - Reinhard Zumkeller, Jan 29 2010
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
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

Extensions

Formula corrected by Reinhard Zumkeller, Feb 23 2010