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-2 of 2 results.

A359200 Triangle read by rows: T(n, k) = A358125(n,k)*binomial(n-1, k), 0 <= k <= n-1.

Original entry on oeis.org

0, 1, 1, 3, 8, 3, 7, 30, 30, 7, 15, 88, 144, 88, 15, 31, 230, 520, 520, 230, 31, 63, 564, 1620, 2240, 1620, 564, 63, 127, 1330, 4620, 8120, 8120, 4620, 1330, 127, 255, 3056, 12432, 26432, 33600, 26432, 12432, 3056, 255, 511, 6894, 32112, 79968, 122976, 122976, 79968, 32112, 6894, 511
Offset: 1

Views

Author

Keywords

Examples

			Triangle begins:
   0;
   1,     1;
   3,     8,     3;
   7,    30,    30,      7;
  15,    88,   144,     88,     15;
  31,   230,   520,    520,    230,     31;
  63,   564,  1620,   2240,   1620,    564,     63;
 127,  1330,  4620,   8120,   8120,   4620,   1330,    127;
 255,  3056, 12432,  26432,  33600,  26432,  12432,   3056,   255;
 511,  6894, 32112,  79968, 122976, 122976,  79968,  32112,  6894,   511;
1023, 15340, 80460, 229440, 413280, 499968, 413280, 229440, 80460, 15340, 1023;
...
		

Crossrefs

Row sums give 2*A005061(n-1).

Programs

  • Maple
    T := n -> local k; seq((2^n - 2^(n - k - 1) - 2^k)*binomial(n - 1, k), k = 0 .. n - 1);
    seq(T(n), n = 1 .. 11);
  • Mathematica
    T[n_, k_] := (2^n - 2^(n - k - 1) - 2^k)*Binomial[n - 1, k]; Table[T[n, k], {n, 1, 10}, {k, 0, n - 1}] // Flatten (* Amiram Eldar, Dec 20 2022 *)

Formula

T(n, k) = (2^n - 2^(n-k-1) - 2^k)*binomial(n-1, k), for n >= 1 and 0 <= k <= n-1.

A357298 Triangle read by rows where all entries in every even row are 1's and the entries in every odd row alternate between 0 (start/end) and 1.

Original entry on oeis.org

0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Keywords

Comments

Row sums are equal to n for even n and (n-1)/2 for odd n; or A065423(n+1).

Examples

			Triangle begins:
   n\k  0  1  2  3  4  5  6  7  8  9 ...
   1    0;
   2    1, 1;
   3    0, 1, 0;
   4    1, 1, 1, 1;
   5    0, 1, 0, 1, 0;
   6    1, 1, 1, 1, 1, 1;
   7    0, 1, 0, 1, 0, 1, 0;
   8    1, 1, 1, 1, 1, 1, 1, 1;
   9    0, 1, 0, 1, 0, 1, 0, 1, 0;
  10    1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
  ...
Formatted as a symmetric triangle -- regular hexagram pattern with 0's at the centers formed by connecting all 1's:
      .----------------------------------------------.
      |                      k=0   1   2   3   4   5 |
      |-----------------------/---/---/---/---/--./  |
-------                          /   /   /   /   /   |
| n=1 |                     0   /   /   /   /   /|   |
-------                            /   /   /   / | 6 |
|   2 |                   1---1   /   /   /   /  |/  |
-------                    \ /       /   /   /   /   |
|   3 |                 0   1   0   /   /   /   /|   |
-------                    / \         /   /   / | 7 |
|   4 |               1---1---1---1   /   /   /  |/  |
-------                \ /     \ /       /   /   /   |
|   5 |             0   1   0   1   0   /   /   /|   |
-------                / \     / \         /   / | 8 |
|   6 |           1---1---1---1---1---1   /   /  |/  |
-------            \ /     \ /     \ /       /   /   |
|   7 |         0   1   0   1   0   1   0   /   /|   |
-------            / \     / \     / \         / | 9 |
|   8 |       1---1---1---1---1---1---1---1   /   /  |
-------        \ /     \ /     \ /     \ /       /   |
|   9 |     0   1   0   1   0   1   0   1   0   /|   |
-------        / \     / \     / \     / \       | . |
|  10 |   1---1---1---1---1---1---1---1---1---1  | . |
-------                                          | . |
		

Crossrefs

Cf. A358125, A065423 (row sums).

Programs

  • Maple
    T := n -> local k; seq(1/2 + 1/2*(-1)^(n*(k + 1)), k = 0 .. n - 1); # formula 1
    seq(T(n), n=1..16); # print first 16 rows of formula 1.
  • PARI
    T(n,k) = bitnegimply(1,n) || bitand(1,k); \\ Kevin Ryde, Dec 21 2022

Formula

T(n, k) = 1/2 + (1/2)*(-1)^(n*(k+1)), for n >= 1 and 0 <= k <= n-1.
T(n, k) = (2^n - 2^(n-k-1) - 2^k) mod 3, for n >= 1 and 0 <= k <= n-1.
T(n, k) = A358125(n, k) mod 3, for n >= 1 and 0 <= k <= n-1.
Showing 1-2 of 2 results.