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.

A245618 Triangle {H(n,k)} similar to Pascal's with sides of 1's, but interior entries are obtained by the rule: H(n,k) = |H(n-1,k)+(-1)^m(n,k)*H(n-1,k-1)|, where m(n,k) = H(n-1,k) + H(n-1,k-1).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 4, 4, 1, 1, 1, 2, 3, 8, 3, 2, 1, 1, 1, 1, 5, 5, 1, 1, 1, 1, 2, 2, 6, 10, 6, 2, 2, 1, 1, 1, 4, 8, 16, 16, 8, 4, 1, 1, 1, 2, 3, 12, 24, 32, 24, 12, 3, 2, 1, 1, 1, 1, 9, 36, 56, 56, 36, 9, 1, 1, 1, 1, 2, 2, 10
Offset: 0

Views

Author

Vladimir Shevelev, Nov 05 2014

Keywords

Comments

Let us consider the operation <+> over integers such that k<+>m = |k+(-1)^(k+m)*m|. Then H(n,k) = H(n-1,k)<+>H(n-1,k-1).
This is an analog of the formula binomial(n,k) = binomial(n-1,k) + binomial(n-1,k-1).

Examples

			Triangle begins
1
1  1
1  2  1
1  1  1  1
1  2  2  2  1
1  1  4  4  1  1
1  2  3  8  3  2  1
....................
		

Crossrefs

Cf. A007318, row sums in A245619, row "sums", using <+>, in A249388.

Programs

  • Mathematica
    parityAdd[a_, b_] := Abs[a + b (-1)^(a + b)];
    triangleHP[n_, 0] := 1;
    triangleHP[n_, n_] := 1;
    triangleHP[n_, k_] := triangleHP[n, k] = parityAdd[triangleHP[n - 1, k - 1], triangleHP[n - 1, k]];
    Flatten[Table[triangleHP[n, k], {n, 0, 15}, {k, 0, n}]] (* Peter J. C. Moses, Nov 05 2014 *)

Extensions

More terms from Peter J. C. Moses, Nov 05 2014