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.

Showing 1-1 of 1 results.

A362311 Triangle read by rows (row length 2*n+1). Row n lists the integer solutions for x in the equation x - 2^n = x/y (x and y are integers).

Original entry on oeis.org

2, 1, 3, 4, 2, 3, 5, 6, 8, 4, 6, 7, 9, 10, 12, 16, 8, 12, 14, 15, 17, 18, 20, 24, 32, 16, 24, 28, 30, 31, 33, 34, 36, 40, 48, 64, 32, 48, 56, 60, 62, 63, 65, 66, 68, 72, 80, 96, 128, 64, 96, 112, 120, 124, 126, 127, 129, 130, 132, 136, 144, 160, 192, 256, 128, 192, 224, 240, 248, 252, 254, 255
Offset: 0

Views

Author

Thomas Scheuerle, Apr 15 2023

Keywords

Examples

			Triangle begins:
      k=0  1  2  3  4  5  6  7  8
  n=0:  2
  n=1:  1, 3, 4
  n=2:  2, 3, 5, 6, 8
  n=3:  4, 6, 7, 9,10,12,16
  n=4:  8,12,14,15,17,18,20,24,32
  ...
Corresponding values for y in the equation:
        k=0  1  2   3  4 5 6 7 8
    n=0:  2
    n=1: -1, 3, 2
    n=2: -1,-3, 5,  3, 2
    n=3: -1,-3,-7,  9, 5,3,2
    n=4: -1,-3,-7,-15,17,9,5,3,2
  ...
		

Crossrefs

Cf. A036289 (row sums).
Cf. A362310.

Programs

  • MATLAB
    function a = A362311( max_row )
        r = 2; a = [];
        for n = 1:max_row
            a = [a r];
            r = [2*r(1:n-1) 2^n-1 2^n+1 2*r(end-n+1:end)];
        end
    end
  • PARI
    T(n,k) = if(k >= n, 2^n + 2^(k-n), 2^n - 2^(n-k-1));
    

Formula

T(n, k) = 2^n - 2^(n-k-1), if k < n.
T(n, k) = 2^n + 2^(k-n), if k >= n.
T(n, 0..n-2) = 2*T(n-1, 0..n-2), for n > 1.
T(n, n-1) = 2^n - 1, for n > 0.
T(n, n) = 2^n + 1, for n > 0.
T(n, n+1..2*n) = 2*T(n-1, n-1..2*(n-1)), for n > 0.
Showing 1-1 of 1 results.