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.

A260845 a(n) = Sum_{k=0..n} (-1)^k*P(n,k)*k!, where P(n,k) is the number of partitions of n into k parts.

Original entry on oeis.org

1, -1, 1, -5, 21, -105, 635, -4507, 36457, -330971, 3334377, -36913947, 445426739, -5818545721, 81805507069, -1231690773053, 19772941871385, -337146625794753, 6085005877228943, -115897323408009187, 2323090928155541677, -48883768421712917555, 1077440388662366900397
Offset: 0

Views

Author

Peter Luschny, Aug 01 2015

Keywords

Crossrefs

Row sums of A318144.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i>1,
          b(n, i-1), 0)+expand(b(n-i, min(n-i, i))*x))
        end:
    a:= n-> (p-> add(i!*coeff(p, x, i)*(-1)^i, i=0..n))(b(n$2)):
    seq(a(n), n=0..27);  # Alois P. Heinz, Sep 18 2019
  • Mathematica
    CoefficientList[ Series[ Sum[ n!(-x)^n / Product[1 - x^k, {k, n}], {n, 0, 22}], {x, 0, 22}], x]
  • Sage
    from sage.combinat.partition import number_of_partitions_length
    [sum([(-1)^k*number_of_partitions_length(n,k)*factorial(k) for k in (0..n)]) for n in (0..22)]

Formula

G.f.: Sum(n!*(-x)^n/Product(1-x^k, k=1..n), n=1..infinity).

A327028 T(n, k) = k! * Sum_{d|n} phi(d) * A008284(n/d, k) for n >= 1, T(0, k) = 0^k. Triangle read by rows for 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 2, 2, 0, 3, 2, 6, 0, 4, 6, 6, 24, 0, 5, 4, 12, 24, 120, 0, 6, 12, 24, 48, 120, 720, 0, 7, 6, 24, 72, 240, 720, 5040, 0, 8, 16, 36, 144, 360, 1440, 5040, 40320, 0, 9, 12, 54, 144, 600, 2160, 10080, 40320, 362880
Offset: 0

Views

Author

Peter Luschny, Aug 20 2019

Keywords

Examples

			[0] 1
[1] 0, 1
[2] 0, 2,  2
[3] 0, 3,  2,  6
[4] 0, 4,  6,  6,  24
[5] 0, 5,  4, 12,  24, 120
[6] 0, 6, 12, 24,  48, 120,  720
[7] 0, 7,  6, 24,  72, 240,  720,  5040
[8] 0, 8, 16, 36, 144, 360, 1440,  5040, 40320
[9] 0, 9, 12, 54, 144, 600, 2160, 10080, 40320, 362880
		

Crossrefs

Cf. A008284, A318144, A000142 (main diagonal), A327025 (row sums), A327029.

Programs

  • Maple
    A327028 := (n,k) -> `if`(n=0, 1, k!*add(phi(d)*A008284(n/d, k), d = divisors(n))):
    seq(seq(A327028(n, k), k=0..n), n=0..9);
  • Mathematica
    A327028[0 , k_] := 1;
    A327028[n_, k_] := DivisorSum[n, EulerPhi[#] A318144[n/#, k] (-1)^k &];
    Table[A327028[n, k], {n, 0,  9}, {k, 0,  n}] // Flatten
  • SageMath
    # uses[DivisorTriangle from A327029]
    from sage.combinat.partition import number_of_partitions_length
    def A318144Abs(n, k): return number_of_partitions_length(n, k)*factorial(k)
    DivisorTriangle(euler_phi, A318144Abs, 10)
Showing 1-2 of 2 results.