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.

A026807 Triangular array T read by rows: T(n,k) = number of partitions of n in which every part is >=k, for k=1,2,...,n.

Original entry on oeis.org

1, 2, 1, 3, 1, 1, 5, 2, 1, 1, 7, 2, 1, 1, 1, 11, 4, 2, 1, 1, 1, 15, 4, 2, 1, 1, 1, 1, 22, 7, 3, 2, 1, 1, 1, 1, 30, 8, 4, 2, 1, 1, 1, 1, 1, 42, 12, 5, 3, 2, 1, 1, 1, 1, 1, 56, 14, 6, 3, 2, 1, 1, 1, 1, 1, 1, 77, 21, 9, 5, 3, 2, 1, 1, 1, 1, 1, 1, 101, 24, 10, 5, 3, 2, 1, 1, 1, 1, 1, 1, 1, 135, 34, 13
Offset: 1

Views

Author

Keywords

Comments

T(n,g) is also the number of not necessarily connected 2-regular graphs with girth at least g: the part i corresponds to the i-cycle; addition of integers corresponds to disconnected union of cycles. - Jason Kimberley, Feb 05 2012

Examples

			Sum_{k>=1} y^k*(-1+1/Product_{i>=0} (1-x^(k+i))) = y*x+(2*y+y^2)*x^2+(3*y+y^2+y^3)*x^3+(5*y+2*y^2+y^3+y^4)*x^4+(7*y+2*y^2+y^3+y^4+y^5)*x^5+...
Triangle starts:  - _Jason Kimberley_, Feb 05 2012
1;
2, 1;
3, 1, 1;
5, 2, 1, 1;
7, 2, 1, 1, 1;
11, 4, 2, 1, 1, 1;
15, 4, 2, 1, 1, 1, 1;
22, 7, 3, 2, 1, 1, 1, 1;
30, 8, 4, 2, 1, 1, 1, 1, 1;
42, 12, 5, 3, 2, 1, 1, 1, 1, 1;
56, 14, 6, 3, 2, 1, 1, 1, 1, 1, 1;
77, 21, 9, 5, 3, 2, 1, 1, 1, 1, 1, 1;
101, 24, 10, 5, 3, 2, 1, 1, 1, 1, 1, 1, 1;
From _Tilman Piesk_, Feb 20 2016: (Start)
n = 12, k = 4, t = A000217(k-1) = 6
vp = A000041(n..n-t) = A000041(12..6) = (77, 56, 42, 30, 22, 15, 11)
vc = A231599(k-1, 0..t) = A231599(3, 0..6) = (1,-1,-1, 0, 1, 1,-1)
T(12, 4) = vp * transpose(vc) = 77-56-42+22+15-11 = 5
(End)
		

Crossrefs

Row sums give A046746.
Cf. A026835.
Cf. A026794.
Cf. A231599.
Not necessarily connected 2-regular graphs with girth at least g [partitions into parts >= g]: this sequence (triangle); columns of this sequence: A000041 (g=1 -- multigraphs with loops allowed), A002865 (g=2 -- multigraphs with loops forbidden), A008483 (g=3), A008484 (g=4), A185325(g=5), A185326 (g=6), A185327 (g=7), A185328 (g=8), A185329 (g=9). For g >= 3, girth at least g implies no loops or parallel edges. - Jason Kimberley, Feb 05 2012
Not necessarily connected 2-regular simple graphs with girth exactly g [partitions with smallest part g]: A026794 (triangle); chosen g: A002865 (g=2), A026796 (g=3), A026797 (g=4), A026798 (g=5), A026799 (g=6), A026800(g=7), A026801 (g=8), A026802 (g=9), A026803 (g=10). - Jason Kimberley, Feb 05 2012
Cf. A002260.

Programs

  • Haskell
    import Data.List (tails)
    a026807 n k = a026807_tabl !! (n-1) !! (k-1)
    a026807_row n = a026807_tabl !! (n-1)
    a026807_tabl = map
       (\row -> map (p $ last row) $ init $ tails row) a002260_tabl
       where p 0  _ = 1
             p _ [] = 0
             p m ks'@(k:ks) = if m < k then 0 else p (m - k) ks' + p m ks
    -- Reinhard Zumkeller, Dec 01 2012
    
  • Maple
    T:= proc(n, k) option remember;
          `if`(k<1 or k>n, 0, `if`(n=k, 1, T(n, k+1) +T(n-k, k)))
        end:
    seq(seq(T(n, k), k=1..n), n=1..14); # Alois P. Heinz, Mar 28 2012
  • Mathematica
    T[n_, k_] := T[n, k] = If[ k<1 || k>n, 0, If[n == k, 1, T[n, k+1] + T[n-k, k]]]; Table [Table[ T[n, k], {k, 1, n}], {n, 1, 14}] // Flatten (* Jean-François Alcover, Jan 28 2015, after Alois P. Heinz *)
  • Python
    from see_there import a231599_row  # A231599
    from sympy.ntheory import npartitions  # A000041
    def a026807(n, k):
        if k > n:
            return 0
        elif k > n/2:
            return 1
        else:
            vc = a231599_row(k-1)
            t = len(vc)
            vp_range = range(n-t, n+1)
            vp_range = vp_range[::-1]  # reverse
            r = 0
            for i in range(0, t):
                r += vc[i] * npartitions(vp_range[i])
            return r
    # Tilman Piesk, Feb 21 2016

Formula

T(n,1)=A000041(n), T(n,2)=A002865(n) for n>1, T(n,3)=A008483(n) for n>2, T(n,4)=A008484(n) for n>3.
G.f.: Sum_{k>=1} y^k*(-1+1/Product_{i>=0} (1-x^(k+i))). - Vladeta Jovovic, Jun 22 2003
T(n, k) = T(n, k+1) + T(n-k, k), T(n, k) = 1 if n/2 < k <= n. - Franklin T. Adams-Watters, Jan 24 2005; Tilman Piesk, Feb 20 2016
T(n, k) = A000041(n..n-t) * transpose(A231599(k-1, 0..t)) with t = A000217(k-1). - Tilman Piesk, Feb 20 2016
Equals A026794 * A000012 as infinite lower triangular matrices. - Gary W. Adamson, Jan 31 2008