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.

A339852 Number of Hamiltonian circuits within parallelograms of size 5 X n on the triangular lattice.

Original entry on oeis.org

1, 44, 549, 7104, 104100, 1475286, 20842802, 295671198, 4190083085, 59374628434, 841470846944, 11925007688342, 168996943899738, 2394974040514288, 33940795571394262, 480998063196253650, 6816550836218124869, 96601974078400509612, 1369012239935377295854, 19401203058253673198258
Offset: 2

Views

Author

Seiichi Manyama, Dec 19 2020

Keywords

Crossrefs

Row 5 of A339849.
Cf. A339202.

Programs

  • Python
    # Using graphillion
    from graphillion import GraphSet
    def make_T_nk(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))
        for i in range(1, k * n, k):
            for j in range(1, k):
                grids.append((i + j - 1, i + j))
        return grids
    def A339849(n, k):
        universe = make_T_nk(n, k)
        GraphSet.set_universe(universe)
        cycles = GraphSet.cycles(is_hamilton=True)
        return cycles.len()
    def A339852(n):
        return A339849(5, n)
    print([A339852(n) for n in range(2, 21)])

Formula

a(2)..a(31) = [1, 44, 549, 7104, 104100, 1475286, 20842802, 295671198, 4190083085, 59374628434, 841470846944, 11925007688342, 168996943899738, 2394974040514288, 33940795571394262, 480998063196253650, 6816550836218124869, 96601974078400509612, 1369012239935377295854, 19401203058253673198258, 274947636268050621400764, 3896469848341602644039976, 55219522831075639350876744, 782553393257523404353337072, 11090096073215866151573834374, 157165289898796544200350430624, 2227296155585971455156172389428, 31564527815820044279227403214372, 447322379530320420841684880901414, 6339309505792160540792742125116082] and
a(n) = 8*a(n-1) + 62*a(n-2) + 384*a(n-3) - 160*a(n-4) - 1628*a(n-5) - 11310*a(n-6) + 9700*a(n-7) - 16019*a(n-8) + 102564*a(n-9) - 98380*a(n-10) + 263340*a(n-11) - 429661*a(n-12) + 174728*a(n-13) - 361330*a(n-14) + 147404*a(n-15) + 284641*a(n-16) + 24764*a(n-17) + 182412*a(n-18) - 156248*a(n-19) - 138559*a(n-20) + 14756*a(n-21) + 14496*a(n-22) - 3660*a(n-23) - 2640*a(n-24) + 328*a(n-25) + 80*a(n-26) - 8*a(n-27) for n > 31.