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.

A339136 Number of (undirected) cycles in the graph C_3 X P_n.

This page as a plain text file.
%I A339136 #15 Feb 16 2025 08:34:01
%S A339136 1,14,63,220,701,2154,6523,19640,59001,177094,531383,1594260,4782901,
%T A339136 14348834,43046643,129140080,387420401,1162261374,3486784303,
%U A339136 10460353100,31381059501,94143178714,282429536363,847288609320,2541865828201,7625597484854,22876792454823,68630377364740
%N A339136 Number of (undirected) cycles in the graph C_3 X P_n.
%H A339136 Seiichi Manyama, <a href="/A339136/b339136.txt">Table of n, a(n) for n = 1..1000</a>
%H A339136 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/GraphCycle.html">Graph Cycle</a>
%F A339136 Empirical g.f.: -x*(9*x+1) / ((x-1)^2 * (3*x-1)). - _Vaclav Kotesovec_, Dec 09 2020
%o A339136 (Python)
%o A339136 # Using graphillion
%o A339136 from graphillion import GraphSet
%o A339136 def make_CnXPk(n, k):
%o A339136     grids = []
%o A339136     for i in range(1, k + 1):
%o A339136         for j in range(1, n):
%o A339136             grids.append((i + (j - 1) * k, i + j * k))
%o A339136         grids.append((i + (n - 1) * k, i))
%o A339136     for i in range(1, k * n, k):
%o A339136         for j in range(1, k):
%o A339136             grids.append((i + j - 1, i + j))
%o A339136     return grids
%o A339136 def A339136(n):
%o A339136     universe = make_CnXPk(3, n)
%o A339136     GraphSet.set_universe(universe)
%o A339136     cycles = GraphSet.cycles()
%o A339136     return cycles.len()
%o A339136 print([A339136(n) for n in range(1, 20)])
%Y A339136 Cf. A059020, A339074, A339137, A339140, A339142, A339143.
%K A339136 nonn
%O A339136 1,2
%A A339136 _Seiichi Manyama_, Nov 25 2020