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.

A180582 Number of Hamiltonian cycles in C_6 X P_n.

This page as a plain text file.
%I A180582 #29 Feb 18 2025 16:29:06
%S A180582 1,8,86,776,7010,63674,578090,5247824,47640092,432480632,3926091512,
%T A180582 35641352528,323554871864,2937255393440,26664624744320,
%U A180582 242063463190976,2197470272854016,19948799940346880,181096701955896896,1644009442040416928,14924441010395894048,135485194778650515104
%N A180582 Number of Hamiltonian cycles in C_6 X P_n.
%H A180582 Seiichi Manyama, <a href="/A180582/b180582.txt">Table of n, a(n) for n = 1..500</a>
%H A180582 Artem M. Karavaev, FlowProblem.ru web-project: <a href="https://web.archive.org/web/20161024010518/http://flowproblem.ru/cycles/hamilton-cycles">Hamilton Cycles</a> page.
%H A180582 <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (9,0,10,-28,-36,-32,-12).
%F A180582 a(n) = -12*a(n-7) - 32*a(n-6) - 36*a(n-5) - 28*a(n-4) + 10*a(n-3) + 9*a(n-1) for n > 8.
%F A180582 G.f.: x*(x +1)*(6*x^6 -14*x^5 -2*x^4 -24*x^3 +16*x^2 -2*x +1)/(12*x^7 +32*x^6 +36*x^5 +28*x^4 -10*x^3 -9*x +1). - _Colin Barker_, Sep 01 2012
%o A180582 (PARI)
%o A180582 a(n) = if(n<1, 0, if(n<=8, [1, 8, 86, 776, 7010, 63674, 578090, 5247824][n], -12*a(n-7) - 32*a(n-6) - 36*a(n-5) - 28*a(n-4) + 10*a(n-3) + 9*a(n-1) ) );
%o A180582 /* _Joerg Arndt_, Sep 02 2012 */
%o A180582 (Python)
%o A180582 # Using graphillion
%o A180582 from graphillion import GraphSet
%o A180582 def make_CnXPk(n, k):
%o A180582     grids = []
%o A180582     for i in range(1, k + 1):
%o A180582         for j in range(1, n):
%o A180582             grids.append((i + (j - 1) * k, i + j * k))
%o A180582         grids.append((i + (n - 1) * k, i))
%o A180582     for i in range(1, k * n, k):
%o A180582         for j in range(1, k):
%o A180582             grids.append((i + j - 1, i + j))
%o A180582     return grids
%o A180582 def A180582(n):
%o A180582     universe = make_CnXPk(6, n)
%o A180582     GraphSet.set_universe(universe)
%o A180582     cycles = GraphSet.cycles(is_hamilton=True)
%o A180582     return cycles.len()
%o A180582 print([A180582(n) for n in range(1, 30)])  # _Seiichi Manyama_, Nov 25 2020
%Y A180582 Column k=6 of A359855.
%Y A180582 Cf. A003699, A003731, A180583, A180584, A180585, A180586, A180587, A180588.
%K A180582 nonn,easy
%O A180582 1,2
%A A180582 _Artem M. Karavaev_, Sep 10 2010