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.

A172971 Triangle T(n, k) = c(n) - c(k) - c(n-k), where c(n) = Product_{j=0..n} Partitions(j), read by rows.

Original entry on oeis.org

-1, -1, -1, -1, -1, -1, -1, 0, 0, -1, -1, 1, 2, 1, -1, -1, 7, 9, 9, 7, -1, -1, 35, 43, 44, 43, 35, -1, -1, 191, 227, 234, 234, 227, 191, -1, -1, 1199, 1391, 1426, 1432, 1426, 1391, 1199, -1, -1, 10079, 11279, 11470, 11504, 11504, 11470, 11279, 10079, -1
Offset: 0

Views

Author

Roger L. Bagula, Feb 06 2010

Keywords

Examples

			Triangle begins as:
  -1;
  -1,    -1;
  -1,    -1,    -1;
  -1,     0,     0,    -1;
  -1,     1,     2,     1,    -1;
  -1,     7,     9,     9,     7,    -1;
  -1,    35,    43,    44,    43,    35,    -1;
  -1,   191,   227,   234,   234,   227,   191,    -1;
  -1,  1199,  1391,  1426,  1432,  1426,  1391,  1199,    -1;
  -1, 10079, 11279, 11470, 11504, 11504, 11470, 11279, 10079,  -1;
		

Crossrefs

Cf. A000009.

Programs

  • Magma
    A000009:= Coefficients(&*[1+x^m:m in [1..100]])[1..100] where x is PolynomialRing(Integers()).1; // Sergei Haller's code
    c:= func< n | (&*[A000009[j+1]: j in [0..n]]) >;
    A172971:= func< n,k | c(n) - c(k) - c(n-k) >;
    [A172971(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Dec 04 2022
    
  • Mathematica
    c[n_]:= Product[PartitionsQ[j], {j,n}];
    T[n_, k_]:= c[n] - (c[k] + c[n-k]);
    Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten
  • SageMath
    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)
    b = EulerTransform(a) # Peter Luschny's code for A000009
    @CachedFunction
    def c(n): return product(b(j) for j in range(n+1))
    def A172971(n,k): return c(n) - c(k) - c(n-k)
    flatten([[A172971(n,k) for k in range(n+1)] for n in range(12)]) # G. C. Greubel, Dec 04 2022

Formula

T(n, k) = c(n) - c(k) - c(n-k), where c(n) = Product_{j=0..n} Partitions(j).
T(n, n-k) = T(n, k).

Extensions

Edited by G. C. Greubel, Dec 04 2022