login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of Hamiltonian paths in C_6 X P_n.
1

%I #44 Jan 12 2021 02:50:43

%S 6,228,4800,76116,1094316,14557092,183735204,2230289220,26275912776,

%T 302338568832,3412921463352,37923555328200,415863933818988,

%U 4509400849281240,48428461587426108,515767225814395500,5452991323044249720,57282647077608267072,598324561437126968664,6217929367753246782612

%N Number of Hamiltonian paths in C_6 X P_n.

%H Seiichi Manyama, <a href="/A338297/b338297.txt">Table of n, a(n) for n = 1..25</a>

%o (Python)

%o # Using graphillion

%o from graphillion import GraphSet

%o def make_CnXPk(n, k):

%o grids = []

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

%o for j in range(1, n):

%o grids.append((i + (j - 1) * k, i + j * k))

%o grids.append((i + (n - 1) * k, i))

%o for i in range(1, k * n, k):

%o for j in range(1, k):

%o grids.append((i + j - 1, i + j))

%o return grids

%o def A(start, goal, n, k):

%o universe = make_CnXPk(n, k)

%o GraphSet.set_universe(universe)

%o paths = GraphSet.paths(start, goal, is_hamilton=True)

%o return paths.len()

%o def B(n, k):

%o m = k * n

%o s = 0

%o for i in range(1, m):

%o for j in range(i + 1, m + 1):

%o s += A(i, j, n, k)

%o return s

%o def A338297(n):

%o return B(6, n)

%o print([A338297(n) for n in range(1, 11)])

%Y Cf. A003689 (C_3 X P_n), A003752 (C_4 X P_n), A003732 (C_5 X P_n), A268894 (C_n X P_n).

%Y Cf. A180582, A339143, A338962.

%K nonn

%O 1,1

%A _Seiichi Manyama_, Dec 18 2020