OFFSET
1,2
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
LINKS
Alois P. Heinz, Rows n = 1..141, flattened
Jason Kimberley, Index of sequences counting not necessarily connected k-regular simple graphs with girth at least g
Tilman Piesk, Table for n = 1..30, table for n = 2..150 without values 1, illustrations of columns n = 2, 3, 4, 5, 6, 7, 8
FORMULA
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
EXAMPLE
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
T(12, 4) = vp * transpose(vc) = 77-56-42+22+15-11 = 5
(End)
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 *)
PROG
(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
(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
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.
KEYWORD
nonn,tabl
AUTHOR
STATUS
approved