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-4 of 4 results.

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

A339137 Number of (undirected) cycles in the graph C_4 X P_n.

Original entry on oeis.org

1, 28, 225, 1540, 10217, 67388, 444017, 2925140, 19270105, 126946444, 836290209, 5509263332, 36293601737, 239092863324, 1575081964113, 10376232739316, 68355938510649, 450311249502892, 2966534083948417, 19542759549039748, 128742647137776169, 848123272992954492
Offset: 1

Views

Author

Seiichi Manyama, Nov 25 2020

Keywords

Crossrefs

Cf. A003699 (Hamiltonian cycles), A288637, A339075, A339136, A339140, A339142, A339143.

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

Formula

Empirical g.f.: -x*(6*x^3+29*x^2-18*x-1) / ((x-1)^2 * (2*x^3+9*x^2-8*x+1)). - Vaclav Kotesovec, Dec 09 2020

A339140 Number of (undirected) cycles in the graph C_n X P_n.

Original entry on oeis.org

6, 63, 1540, 119235, 29059380, 21898886793, 50826232189144, 361947451544923557, 7884768474166076906420, 524518303312357729182869149, 106448798893410608983300257207398, 65866487708413725073741586390176988083, 124207126413825808953168887580780401519104028
Offset: 2

Views

Author

Seiichi Manyama, Nov 25 2020

Keywords

Examples

			If we represent each vertex with o, used edges with lines and unused edges with dots, and repeat the wraparound edges on left and right, the a(2) = 6 solutions for n = 2 are:
    .o-o.   -o.o-   .o-o.   -o.o-   -o-o-   .o.o.
     | |     | |     | |     | |     . .     . .
    .o-o.   .o-o.   -o.o-   -o.o-   .o.o.   -o-o-
		

Crossrefs

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

Extensions

a(10) and a(12) from Seiichi Manyama, Nov 25 2020
a(2), a(9), a(11) and a(13)-a(18) from Ed Wynn, Jun 25 2023

A339142 Number of (undirected) cycles in the graph C_5 X P_n.

Original entry on oeis.org

1, 52, 733, 9394, 119235, 1512196, 19177677, 243212478, 3084441599, 39117172360, 496087629441, 6291429718962, 79788500460003, 1011885230273244, 12832823194696645, 162747064808635206, 2063973507784856167, 26175505197898511728, 331960206747350288969, 4209950410912939269210
Offset: 1

Views

Author

Seiichi Manyama, Nov 25 2020

Keywords

Crossrefs

Cf. A003731 (Hamiltonian cycles), A339117, A339136, A339137, A339140, A339143.

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

Extensions

More terms from Ed Wynn, Jun 28 2023
Showing 1-4 of 4 results.