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.

A127803 Inverse of number triangle A(n,k) = 1/(2*2^n-1) if k <= n <= 2k, 0 otherwise.

Original entry on oeis.org

1, 0, 3, 0, -3, 7, 0, 3, -7, 15, 0, 0, 0, -15, 31, 0, -3, 7, 0, -31, 63, 0, 0, 0, 0, 0, -63, 127, 0, 3, -7, 15, 0, 0, -127, 255, 0, 0, 0, 0, 0, 0, 0, -255, 511, 0, 0, 0, -15, 31, 0, 0, 0, -511, 1023, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1023, 2047
Offset: 0

Views

Author

Paul Barry, Jan 29 2007

Keywords

Comments

Row sums are A127804.

Examples

			Triangle begins
  1;
  0,  3;
  0, -3,  7;
  0,  3, -7,  15;
  0,  0,  0, -15,  31;
  0, -3,  7,   0, -31,  63;
  0,  0,  0,   0,   0, -63,  127;
  0,  3, -7,  15,   0,   0, -127,  255;
  0,  0,  0,   0,   0,   0,    0, -255,  511;
  0,  0,  0, -15,  31,   0,    0,    0, -511,  1023;
  0,  0,  0,   0,   0,   0,    0,    0,    0, -1023, 2047;
  ...
Inverse of
  1;
  0, 1/3;
  0, 1/7, 1/7;
  0,  0,  1/15, 1/15;
  0,  0,  1/31, 1/31,  1/31;
  0,  0,   0,   1/63,  1/63,  1/63;
  0,  0,   0,   1/127, 1/127, 1/127,  1/127;
  0,  0,   0,    0,    1/255, 1/255,  1/255,  1/255;
  0,  0,   0,    0,    1/511, 1/511,  1/511,  1/511,  1/511;
  0,  0,   0,    0,     0,    1/1023, 1/1023, 1/1023, 1/1023, 1/1023;
  0,  0,   0,    0,     0,    1/2047, 1/2047, 1/2047, 1/2047, 1/2047, 1/2047;
  ...
		

Crossrefs

Cf. A127804.

Programs

  • Maple
    A127803 := proc(n,k)
        A := Matrix(n+1,n+1) ;
        for r from 0 to n do
        for c from 0 to n do
            if c <= r and r <= 2*c then
                A[r+1,c+1] := 1/(2*2^r-1) ;
            else
                A[r+1,c+1] := 0 ;
            end if;
        end do:
        end do:
        Ainv := LinearAlgebra[MatrixInverse](A) ;
        Ainv[n+1,k+1] ;
    end proc:
    seq(seq( A127803(n,k),k=0..n),n=0..12) ; # R. J. Mathar, Feb 12 2024
  • Mathematica
    rows = 11;
    A[n_, k_] := If[k <= n, If[n <= 2 k, 1/(2*2^n - 1), 0], 0];
    T = Table[A[n, k], {n, 0, rows-1}, {k, 0, rows-1}] // Inverse;
    Table[T[[n, k]], {n, 1, rows}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jul 03 2018 *)
  • PARI
    B(n,k) = if(k<=n,if(n<=2*k,1/(2*2^n-1),0),0);
    lista(nn) = {my(m = matrix(nn, nn, n, k, B(n-1,k-1))^(-1)); for (n=1, nn, for (k=1, n, print1(m[n,k], ", ");); print(););} \\ Michel Marcus, Jul 03 2018