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”).

A003689
Number of Hamiltonian paths in K_3 X P_n.
3
3, 30, 144, 588, 2160, 7440, 24576, 78912, 248448, 771456, 2371968, 7241856, 21998976, 66586752, 201025920, 605781120, 1823094144, 5481472128, 16470172032, 49464779904, 148508372352, 445764192384, 1337792747904
OFFSET
1,1
REFERENCES
F. Faase, On the number of specific spanning subgraphs of the graphs G X P_n, Ars Combin. 49 (1998), 129-154.
LINKS
FORMULA
a(n) = 7*a(n-1) - 16*a(n-2) + 12*a(n-3), n>5.
a(n) = 128 * 3^(n-2) - (21*n + 57) * 2^(n-2), n>2. - Ralf Stephan, Sep 26 2004
G.f.: 3*x*(1+3*x-6*x^2+8*x^3-4*x^4) / ((1-3*x)*(1-2*x)^2). [R. J. Mathar, Dec 16 2008]
MATHEMATICA
Join[{3, 30}, LinearRecurrence[{7, -16, 12}, {144, 588, 2160}, 30]] (* Harvey P. Dale, Apr 26 2014 *)
CoefficientList[Series[3 (1 + 3 x - 6 x^2 + 8 x^3 - 4 x^4)/((1 - 3 x) (1 - 2 x)^2), {x, 0, 30}], x] (* Vincenzo Librandi, Apr 27 2014 *)
PROG
(Magma) [3, 30] cat [128*3^(n-2)-(21*n+57)*2^(n-2): n in [3..30]]; // Vincenzo Librandi, Apr 27 2014
(Python)
# Using graphillion
from graphillion import GraphSet
def make_CnXPk(n, k):
grids = []
for i in range(1, k + 1):
for j in range(1, n):
grids.append((i + (j - 1) * k, i + j * k))
grids.append((i + (n - 1) * k, i))
for i in range(1, k * n, k):
for j in range(1, k):
grids.append((i + j - 1, i + j))
return grids
def A(start, goal, n, k):
universe = make_CnXPk(n, k)
GraphSet.set_universe(universe)
paths = GraphSet.paths(start, goal, is_hamilton=True)
return paths.len()
def B(n, k):
m = k * n
s = 0
for i in range(1, m):
for j in range(i + 1, m + 1):
s += A(i, j, n, k)
return s
def A003689(n):
return B(3, n)
print([A003689(n) for n in range(1, 21)]) # Seiichi Manyama, Dec 18 2020
CROSSREFS
KEYWORD
nonn,easy
STATUS
approved

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy