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.

Showing 1-5 of 5 results.

A359855 Array read by antidiagonals: T(n,k) is the number of Hamiltonian cycles in the stacked prism graph P_n X C_k, n >= 1, k >= 2.

Original entry on oeis.org

1, 1, 4, 1, 3, 4, 1, 6, 6, 4, 1, 5, 22, 12, 4, 1, 8, 30, 82, 24, 4, 1, 7, 86, 160, 306, 48, 4, 1, 10, 126, 776, 850, 1142, 96, 4, 1, 9, 318, 1484, 7010, 4520, 4262, 192, 4, 1, 12, 510, 6114, 18452, 63674, 24040, 15906, 384, 4, 1, 11, 1182, 12348, 126426, 229698, 578090, 127860, 59362, 768, 4
Offset: 1

Views

Author

Andrew Howroyd, Feb 18 2025

Keywords

Comments

The case for P_n X C_2 is determined using a double edge for C_2.

Examples

			Array begins:
=========================================================
n\k | 2   3     4      5       6        7          8 ...
----+---------------------------------------------------
  1 | 1   1     1      1       1        1          1 ...
  2 | 4   3     6      5       8        7         10 ...
  3 | 4   6    22     30      86      126        318 ...
  4 | 4  12    82    160     776     1484       6114 ...
  5 | 4  24   306    850    7010    18452     126426 ...
  6 | 4  48  1142   4520   63674   229698    2588218 ...
  7 | 4  96  4262  24040  578090  2861964   53055038 ...
  8 | 4 192 15906 127860 5247824 35663964 1087362018 ...
   ...
		

Crossrefs

Rows 1..2 are A000012, A103889(n+1).
Cf. A222196 (order of recurrences), A222197 (main diagonal), A270273, A321172.

A339143 Number of (undirected) cycles in the graph C_6 X P_n.

Original entry on oeis.org

1, 94, 2301, 53644, 1248517, 29059380, 676374187, 15743068612, 366430841199, 8528932801462, 198516848612143, 4620617865735414, 107548097901476485, 2503256858519071030, 58265046263626611537, 1356159518571223920304, 31565557014929042873017
Offset: 1

Views

Author

Seiichi Manyama, Nov 25 2020

Keywords

Crossrefs

Cf. A180582 (Hamiltonian cycles), A339118, A339136, A339137, A339140, A339142.

Programs

  • 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 A339143(n):
        universe = make_CnXPk(6, n)
        GraphSet.set_universe(universe)
        cycles = GraphSet.cycles()
        return cycles.len()
    print([A339143(n) for n in range(1, 20)])

Formula

Empirical g.f.: -x*(1 + 63*x - 418*x^2 + 287*x^3 + 840*x^4 + 1721*x^5 - 2540*x^6 + 3001*x^7 - 1149*x^8 - 544*x^9 + 90*x^10) / ((-1 + x)^2 * (-1 + 29*x - 136*x^2 + 55*x^3 + 190*x^4 + 645*x^5 - 626*x^6 + 953*x^7 - 409*x^8 - 178*x^9 + 30*x^10)). - Vaclav Kotesovec, Dec 09 2020

A180583 Number of Hamiltonian cycles in C_7 X P_n.

Original entry on oeis.org

1, 7, 126, 1484, 18452, 229698, 2861964, 35663964, 444486280, 5539931796, 69048910000, 860620499760, 10726732430288, 133697577587000, 1666401898058352, 20769976722986288, 258876295158900832, 3226625529605854320, 40216553455854426560, 501257787787122948736
Offset: 1

Views

Author

Artem M. Karavaev, Sep 10 2010

Keywords

Crossrefs

Formula

a(n) = -16a(n-12) + 128a(n-11) + 496a(n-10) + 2040a(n-9) + 3724a(n-8) + 2064a(n-7) - 196a(n-6) - 772a(n-5) - 440a(n-4) - 112a(n-3) + 18a(n-2) + 12a(n-1) for n > 13.
G.f.: x*(16*x^12 -16*x^11 +8*x^10 -192*x^9 +588*x^8 +1996*x^7 +700*x^6 -474*x^5 -400*x^4 -42*x^3 +24*x^2 -5*x +1)/(16*x^12 -128*x^11 -496*x^10 -2040*x^9 -3724*x^8 -2064*x^7 +196*x^6 +772*x^5 +440*x^4 +112*x^3 -18*x^2 -12*x +1). - Colin Barker, Sep 01 2012

Extensions

a(18) onwards from Andrew Howroyd, Feb 18 2025

A222196 Order of linear recurrence for number of Hamiltonian cycles in the graph C_n X P_k as a function of k.

Original entry on oeis.org

1, 2, 3, 7, 12, 20, 51, 74, 246, 303, 1320, 1514, 7936, 8363
Offset: 3

Views

Author

N. J. A. Sloane, Feb 14 2013

Keywords

Crossrefs

A338297 Number of Hamiltonian paths in C_6 X P_n.

Original entry on oeis.org

6, 228, 4800, 76116, 1094316, 14557092, 183735204, 2230289220, 26275912776, 302338568832, 3412921463352, 37923555328200, 415863933818988, 4509400849281240, 48428461587426108, 515767225814395500, 5452991323044249720, 57282647077608267072, 598324561437126968664, 6217929367753246782612
Offset: 1

Views

Author

Seiichi Manyama, Dec 18 2020

Keywords

Crossrefs

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

Programs

  • 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 A338297(n):
        return B(6, n)
    print([A338297(n) for n in range(1, 11)])
Showing 1-5 of 5 results.