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.

A262496 Number of partitions of n into parts of sorts {1, 2, ... } which are introduced in ascending order such that sorts of adjacent parts are different.

Original entry on oeis.org

1, 1, 2, 4, 10, 27, 87, 312, 1269, 5703, 28082, 149643, 855938, 5217753, 33712046, 229799508, 1646314498, 12355371024, 96861186897, 791258791159, 6720627161903, 59234364141343, 540812222291531, 5106663817387466, 49798678281320763, 500857393909589995
Offset: 0

Views

Author

Alois P. Heinz, Sep 24 2015

Keywords

Examples

			a(3) = 4: 3a, 2a1b, 1a1b1a, 1a1b1c (in this example the sorts are labeled a, b, c).
		

Crossrefs

Row sums of A262495.
Cf. A258466.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0 or i=1, k^(n-1),
          b(n, i-1, k) +`if`(i>n, 0, k*b(n-i, i, k)))
        end:
    A:= (n, k)-> `if`(n=0, 1, `if`(k<2, k, k*b(n$2, k-1))):
    T:= (n, k)->  add(A(n, k-i)*(-1)^i/(i!*(k-i)!), i=0..k):
    a:= n-> add(T(n, k), k=0..n):
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n==0 || i==1, k^(n-1), b[n, i-1, k] + If[i > n, 0, k*b[n-i, i, k]]]; A[n_, k_] := If[n==0, 1, If[k<2, k, k*b[n, n, k - 1]]]; T[n_, k_] := Sum[A[n, k-i]*(-1)^i/(i!*(k-i)!), {i, 0, k}]; a[n_] := Sum[T[n, k], {k, 0, n}]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 05 2017, translated from Maple *)