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.

A368043 Triangle read by rows: T(n, k) = 2^(n + k).

Original entry on oeis.org

1, 2, 4, 4, 8, 16, 8, 16, 32, 64, 16, 32, 64, 128, 256, 32, 64, 128, 256, 512, 1024, 64, 128, 256, 512, 1024, 2048, 4096, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144
Offset: 0

Views

Author

Peter Luschny, Dec 09 2023

Keywords

Examples

			[0]  [  1]
[1]  [  2,   4]
[2]  [  4,   8,  16]
[3]  [  8,  16,  32,    64]
[4]  [ 16,  32,  64,   128,  256]
[5]  [ 32,  64,  128,  256,  512, 1024]
[6]  [ 64, 128,  256,  512, 1024, 2048,  4096]
[7]  [128, 256,  512, 1024, 2048, 4096,  8192, 16384]
[8]  [256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536]
		

Crossrefs

Cf. A000079 (T(n,0)), A004171 (T(n,n-1)), A000302 (T(n,n)), A171476 (row sums), A003683 (alternating row sums), A134353 (antidiagonal sums), A001018 (T(2n, n)), A094014 (T(n, n/2)), A002697.

Programs

  • Mathematica
    Array[2^Range[#,2#]&,10,0] (* Paolo Xausa, Dec 09 2023 *)
  • Python
    from functools import cache
    @cache
    def T_row(n: int) -> list[int]:
        if n == 0: return [1]
        row = T_row(n - 1) + [0]
        for k in range(n): row[k] *= 2
        row[n] = row[n - 1] * 2
        return row
    for n in range(11): print(T_row(n))

Formula

G.f.: 1/((1 - 2*x)*(1 - 4*x*y)). - Stefano Spezia, Dec 09 2023