login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A338960 Number of (undirected) paths in C_4 X P_n. 5
12, 444, 7584, 103184, 1246892, 14010212, 150042016, 1554630384, 15735477148, 156604841764, 1539509238384, 14997746124304, 145132198165132, 1397493793301476, 13407313676392384, 128278229316758192, 1224872135665718780, 11678406201771406628, 111224649402691424912, 1058446545979095492816 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
PROG
(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)
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 A338960(n):
return B(4, n)
print([A338960(n) for n in range(1, 11)])
CROSSREFS
Sequence in context: A303922 A246502 A281248 * A195616 A126603 A291996
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Dec 18 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)