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.

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

Original entry on oeis.org

2, 3, 4, 5, 6, 8, 9, 10, 12, 16, 17, 18, 20, 24, 32, 33, 34, 36, 40, 48, 64, 65, 66, 68, 72, 80, 96, 128, 129, 130, 132, 136, 144, 160, 192, 256, 257, 258, 260, 264, 272, 288, 320, 384, 512, 513, 514, 516, 520, 528, 544, 576, 640, 768, 1024, 1025, 1026, 1028, 1032, 1040, 1056, 1088, 1152, 1280, 1536, 2048
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 28 2010

Keywords

Comments

Essentially the same as A048645. - T. D. Noe, Mar 28 2011

Examples

			Triangle begins as:
     2;
     3,    4;
     5,    6,    8;
     9,   10,   12,   16;
    17,   18,   20,   24,   32;
    33,   34,   36,   40,   48,   64;
    65,   66,   68,   72,   80,   96,  128;
   129,  130,  132,  136,  144,  160,  192,  256;
   257,  258,  260,  264,  272,  288,  320,  384,  512;
   513,  514,  516,  520,  528,  544,  576,  640,  768, 1024;
  1025, 1026, 1028, 1032, 1040, 1056, 1088, 1152, 1280, 1536, 2048;
		

Crossrefs

Programs

  • Magma
    [2^n + 2^k: k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 07 2021
    
  • Mathematica
    Flatten[Table[2^n + 2^m, {n,0,10}, {m, 0, n}]] (* T. D. Noe, Jun 18 2013 *)
  • PARI
    A173786(n) = { my(c = (sqrtint(8*n + 1) - 1) \ 2); 1 << c + 1 << (n - binomial(c + 1, 2)); }; \\ Antti Karttunen, Feb 29 2024, after David A. Corneth's PARI-program in A048645
    
  • Python
    from math import isqrt, comb
    def A173786(n):
        a = (m:=isqrt(k:=n+1<<1))-(k<=m*(m+1))
        return (1<Chai Wah Wu, Jun 20 2025
  • Sage
    flatten([[2^n + 2^k for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jul 07 2021
    

Formula

1 <= A000120(T(n,k)) <= 2.
For n>0, 0<=kA048645(n+1,k+2) and T(n,n) = A048645(n+2,1).
Row sums give A006589(n).
Central terms give A161168(n).
T(2*n+1,n) = A007582(n+1).
T(2*n+1,n+1) = A028403(n+1).
T(n,k) = A140513(n,k) - A173787(n,k), 0<=k<=n.
T(n,k) = A059268(n+1,k+1) + A173787(n,k), 0
T(n,k) * A173787(n,k) = A173787(2*n,2*k), 0<=k<=n.
T(n,0) = A000051(n).
T(n,1) = A052548(n) for n>0.
T(n,2) = A140504(n) for n>1.
T(n,3) = A175161(n-3) for n>2.
T(n,4) = A175162(n-4) for n>3.
T(n,5) = A175163(n-5) for n>4.
T(n,n-4) = A110287(n-4) for n>3.
T(n,n-3) = A005010(n-3) for n>2.
T(n,n-2) = A020714(n-2) for n>1.
T(n,n-1) = A007283(n-1) for n>0.
T(n,n) = 2*A000079(n).

Extensions

Typo in first comment line fixed by Reinhard Zumkeller, Mar 07 2010