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.

A279009 Alternating Jacobsthal triangle A_{-2}(n,k) read by rows.

Original entry on oeis.org

1, 1, 1, -2, 0, 1, -2, -2, -1, 1, 4, 0, -1, -2, 1, 4, 4, 1, 1, -3, 1, -8, 0, 3, 0, 4, -4, 1, -8, -8, -3, 3, -4, 8, -5, 1, 16, 0, -5, -6, 7, -12, 13, -6, 1, 16, 16, 5, 1, -13, 19, -25, 19, -7, 1, -32, 0, 11, 4, 14, -32, 44, -44, 26, -8, 1
Offset: 0

Views

Author

N. J. A. Sloane, Dec 07 2016

Keywords

Examples

			Triangle begins:
1,
1,   1,
-2,  0,  1,
-2, -2, -1,  1,
4,   0, -1, -2,   1,
4,   4,  1,  1,  -3,   1,
-8,  0,  3,  0,   4, - 4,   1,
-8, -8, -3,  3,  -4,   8,  -5,   1,
16,  0, -5, -6,   7, -12,  13,  -6,  1,
16, 16,  5,  1, -13,  19, -25,  19, -7,  1,
-32, 0, 11,  4,  14, -32,  44, -44, 26, -8, 1,
...
		

Crossrefs

Programs

  • Mathematica
    a[n_, 0] := (-2)^Floor[n/2]; a[n_, n_] = 1; a[n_, k_] /; 0 <= k <= n := a[n, k] = a[n-1, k-1] - a[n-1, k]; a[, ] = 0;
    Table[a[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Oct 05 2018 *)