login
Number of undirected cycles in a triangular grid graph, n vertices on each side.
6

%I #27 Jul 08 2023 20:56:58

%S 0,1,11,110,2402,128967,16767653,5436906668,4406952731948,

%T 8819634719356421,43329348004927734247,522235268182347360718818,

%U 15436131339319739257518081878,1117847654274955574635482276231683,198163274851163063009517020867737770265

%N Number of undirected cycles in a triangular grid graph, n vertices on each side.

%H Ed Wynn, <a href="/A266513/b266513.txt">Table of n, a(n) for n = 1..17</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/GraphCycle.html">Graph Cycle</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/TriangularGridGraph.html">Triangular Grid Graph</a>

%e 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.

%e 4 basic cycle shapes on a(3):

%e o

%e / \

%e o o---o o---o o o

%e / \ / / / \ / \

%e o---o o---o o---o---o o---o---o

%o (Python)

%o # Using graphillion

%o from graphillion import GraphSet

%o def make_n_triangular_grid_graph(n):

%o s = 1

%o grids = []

%o for i in range(n + 1, 1, -1):

%o for j in range(i - 1):

%o a, b, c = s + j, s + j + 1, s + i + j

%o grids.extend([(a, b), (a, c), (b, c)])

%o s += i

%o return grids

%o def A266513(n):

%o if n == 1: return 0

%o universe = make_n_triangular_grid_graph(n - 1)

%o GraphSet.set_universe(universe)

%o cycles = GraphSet.cycles()

%o return cycles.len()

%o print([A266513(n) for n in range(1, 12)]) # _Seiichi Manyama_, Nov 30 2020

%Y Cf. A112676, A112675, A140517, A269869.

%K nonn

%O 1,3

%A _Andrew Howroyd_, Apr 06 2016