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.

A156224 Triangle T(n, k) = binomial(n, k)*(A000009(n) + A000009(n-k) + A000009(k)) - 2, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 3, 10, 10, 3, 3, 18, 22, 18, 3, 5, 28, 58, 58, 28, 5, 7, 46, 103, 158, 103, 46, 7, 9, 68, 187, 313, 313, 187, 68, 9, 11, 94, 306, 614, 698, 614, 306, 94, 11, 15, 133, 502, 1174, 1636, 1636, 1174, 502, 133, 15, 19, 188, 763, 2038, 3358, 4030, 3358, 2038, 763, 188, 19
Offset: 0

Views

Author

Roger L. Bagula, Feb 06 2009

Keywords

Examples

			Triangle begins as:
   1;
   1,   1;
   1,   4,   1;
   3,  10,  10,    3;
   3,  18,  22,   18,    3;
   5,  28,  58,   58,   28,    5;
   7,  46, 103,  158,  103,   46,    7;
   9,  68, 187,  313,  313,  187,   68,    9;
  11,  94, 306,  614,  698,  614,  306,   94,  11;
  15, 133, 502, 1174, 1636, 1636, 1174,  502, 133,  15;
  19, 188, 763, 2038, 3358, 4030, 3358, 2038, 763, 188, 19;
		

Crossrefs

Cf. A000009.

Programs

  • Mathematica
    T[n_, k_]:= Binomial[n, k]*(PartitionsQ[n] +PartitionsQ[n-k] +PartitionsQ[k]) -2;
    Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten
  • Sage
    # Uses Peter Luschny's program for A000009
    def EulerTransform(a):
        @cached_function
        def b(n):
            if n == 0: return 1
            s = sum(sum(d * a(d) for d in divisors(j)) * b(n-j) for j in (1..n))
            return s//n
        return b
    a = BinaryRecurrenceSequence(0, 1)
    P = EulerTransform(a)
    def T(n,k): return binomial(n,k)*(P(n) + P(n-k) + P(k)) - 2
    flatten([[T(n,k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Dec 31 2021

Formula

T(n, k) = binomial(n, k)*(A000009(n) + A000009(n-k) + A000009(k)) - 2.
T(n, n-k) = T(n, k).

Extensions

Edited by G. C. Greubel, Dec 31 2021