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.

A339795 Number of (undirected) paths in the graph C_3 X C_n.

This page as a plain text file.
%I A339795 #19 Feb 16 2025 08:34:01
%S A339795 4536,41676,324570,2298906,15340836,98401032,614180286,3759485910,
%T A339795 22684148388,135385868268,801141412422,4708188092034,27512477620020,
%U A339795 160001531341584,926684449543278,5347897587948078,30765345147232932,176489253686952180,1009897820473377654
%N A339795 Number of (undirected) paths in the graph C_3 X C_n.
%H A339795 Seiichi Manyama, <a href="/A339795/b339795.txt">Table of n, a(n) for n = 3..50</a>
%H A339795 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/TorusGridGraph.html">Torus Grid Graph</a>
%o A339795 (Python)
%o A339795 # Using graphillion
%o A339795 from graphillion import GraphSet
%o A339795 def make_CnXCk(n, k):
%o A339795     grids = []
%o A339795     for i in range(1, k + 1):
%o A339795         for j in range(1, n):
%o A339795             grids.append((i + (j - 1) * k, i + j * k))
%o A339795         grids.append((i + (n - 1) * k, i))
%o A339795     for i in range(1, k * n, k):
%o A339795         for j in range(1, k):
%o A339795             grids.append((i + j - 1, i + j))
%o A339795         grids.append((i + k - 1, i))
%o A339795     return grids
%o A339795 def A(start, goal, n, k):
%o A339795     universe = make_CnXCk(n, k)
%o A339795     GraphSet.set_universe(universe)
%o A339795     paths = GraphSet.paths(start, goal)
%o A339795     return paths.len()
%o A339795 def B(n, k):
%o A339795     m = k * n
%o A339795     s = 0
%o A339795     for i in range(1, m):
%o A339795         for j in range(i + 1, m + 1):
%o A339795             s += A(i, j, n, k)
%o A339795     return s
%o A339795 def A339795(n):
%o A339795     return B(n, 3)
%o A339795 print([A339795(n) for n in range(3, 10)])
%Y A339795 Cf. A307919, A339796, A358869, A358872.
%Y A339795 Cf. A339074, A339797 (Hamiltonian paths).
%K A339795 nonn
%O A339795 3,1
%A A339795 _Seiichi Manyama_, Dec 17 2020