login
A339136
Number of (undirected) cycles in the graph C_3 X P_n.
5
1, 14, 63, 220, 701, 2154, 6523, 19640, 59001, 177094, 531383, 1594260, 4782901, 14348834, 43046643, 129140080, 387420401, 1162261374, 3486784303, 10460353100, 31381059501, 94143178714, 282429536363, 847288609320, 2541865828201, 7625597484854, 22876792454823, 68630377364740
OFFSET
1,2
LINKS
Eric Weisstein's World of Mathematics, Graph Cycle
FORMULA
Empirical g.f.: -x*(9*x+1) / ((x-1)^2 * (3*x-1)). - Vaclav Kotesovec, Dec 09 2020
PROG
(Python)
# Using graphillion
from graphillion import GraphSet
def make_CnXPk(n, k):
grids = []
for i in range(1, k + 1):
for j in range(1, n):
grids.append((i + (j - 1) * k, i + j * k))
grids.append((i + (n - 1) * k, i))
for i in range(1, k * n, k):
for j in range(1, k):
grids.append((i + j - 1, i + j))
return grids
def A339136(n):
universe = make_CnXPk(3, n)
GraphSet.set_universe(universe)
cycles = GraphSet.cycles()
return cycles.len()
print([A339136(n) for n in range(1, 20)])
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Nov 25 2020
STATUS
approved