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!)
A339098 Square array T(n,k), n >= 2, k >= 2, read by antidiagonals, where T(n,k) is the number of (undirected) cycles on the n X k king graph. 7
7, 30, 30, 85, 348, 85, 204, 3459, 3459, 204, 451, 33145, 136597, 33145, 451, 954, 316164, 4847163, 4847163, 316164, 954, 1969, 3013590, 171903334, 545217435, 171903334, 3013590, 1969, 4008, 28722567, 6109759868, 61575093671, 61575093671, 6109759868, 28722567, 4008 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
2,1
LINKS
Eric Weisstein's World of Mathematics, Graph Cycle
Eric Weisstein's World of Mathematics, King Graph
FORMULA
T(n,k) = T(k,n).
EXAMPLE
Square array T(n,k) begins:
7, 30, 85, 204, 451, ...
30, 348, 3459, 33145, 316164, ...
85, 3459, 136597, 4847163, 171903334, ...
204, 33145, 4847163, 545217435, 61575093671, ...
451, 316164, 171903334, 61575093671, 21964731190911, ...
PROG
(Python)
# Using graphillion
from graphillion import GraphSet
def make_nXk_king_graph(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))
if i < k:
grids.append((i + (j - 1) * k, i + j * k + 1))
if i > 1:
grids.append((i + (j - 1) * k, i + j * k - 1))
for i in range(1, k * n, k):
for j in range(1, k):
grids.append((i + j - 1, i + j))
return grids
def A339098(n, k):
universe = make_nXk_king_graph(n, k)
GraphSet.set_universe(universe)
cycles = GraphSet.cycles()
return cycles.len()
print([A339098(j + 2, i - j + 2) for i in range(9 - 1) for j in range(i + 1)])
CROSSREFS
Rows and columns 2..5 give A339196, A339197, A339198, A339199.
Main diagonal gives A234622.
Sequence in context: A157422 A061644 A053621 * A210107 A266604 A018831
KEYWORD
nonn,tabl
AUTHOR
Seiichi Manyama, Nov 27 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 19 08:28 EDT 2024. Contains 371782 sequences. (Running on oeis4.)