|
|
A266513
|
|
Number of undirected cycles in a triangular grid graph, n vertices on each side.
|
|
6
|
|
|
0, 1, 11, 110, 2402, 128967, 16767653, 5436906668, 4406952731948, 8819634719356421, 43329348004927734247, 522235268182347360718818, 15436131339319739257518081878, 1117847654274955574635482276231683, 198163274851163063009517020867737770265
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
EXAMPLE
|
Of the 11 cycles in the triangular grid with 3 vertices per side, 4 have length 3, 3 have length 4, 3 have length 5 and 1 has length 6.
4 basic cycle shapes on a(3):
o
/ \
o o---o o---o o o
/ \ / / / \ / \
o---o o---o o---o---o o---o---o
|
|
PROG
|
(Python)
# Using graphillion
from graphillion import GraphSet
def make_n_triangular_grid_graph(n):
s = 1
grids = []
for i in range(n + 1, 1, -1):
for j in range(i - 1):
a, b, c = s + j, s + j + 1, s + i + j
grids.extend([(a, b), (a, c), (b, c)])
s += i
return grids
if n == 1: return 0
universe = make_n_triangular_grid_graph(n - 1)
GraphSet.set_universe(universe)
cycles = GraphSet.cycles()
return cycles.len()
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|