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

A222199 Number of Hamiltonian cycles in the graph C_n X C_n.

Original entry on oeis.org

48, 1344, 23580, 3273360, 257165468, 171785923808, 61997157648756, 196554899918485160
Offset: 3

Views

Author

N. J. A. Sloane, Feb 14 2013

Keywords

Comments

C_n X C_n is also known as the (n,n)-torus grid graph.

Crossrefs

Programs

  • Mathematica
    Table[Length[FindHamiltonianCycle[GraphProduct[CycleGraph[n], CycleGraph[n], "Cartesian"], All]], {n, 3, 6}] (* Eric W. Weisstein, Dec 16 2023 *)

A278417 a(n) = n*((2+sqrt(3))^n + (2-sqrt(3))^n)/2.

Original entry on oeis.org

0, 2, 14, 78, 388, 1810, 8106, 35294, 150536, 632034, 2620870, 10759342, 43804812, 177105266, 711809378, 2846259390, 11330543632, 44929049794, 177540878718, 699402223118, 2747583822740, 10766828545746, 42095796462874, 164244726238366, 639620518118424, 2486558615814050, 9651161613824822, 37403957244654702
Offset: 0

Views

Author

Indranil Ghosh, Nov 21 2016

Keywords

Comments

This was originally based on a graph theory formula in the Wikipedia which turned out to be wrong.

Crossrefs

Programs

  • Maple
    f:=n->expand(n*((2+sqrt(3))^n + (2-sqrt(3))^n)/2); # N. J. A. Sloane, May 13 2017
  • Mathematica
    Table[Simplify[(n/2) (((2 + #)^n + (2 - #)^n)) &@ Sqrt@ 3], {n, 3, 27}] (* or *)
    Drop[#, 3] &@ CoefficientList[Series[2 x^3*(39 - 118 x + 55 x^2 - 7 x^3)/(1 - 4 x + x^2)^2, {x, 0, 27}], x] (* Michael De Vlieger, Nov 24 2016 *)
    LinearRecurrence[{8,-18,8,-1},{0,2,14,78},30] (* Harvey P. Dale, Jan 01 2021 *)
  • PARI
    vector(25, n, n+=2; n*((2+sqrt(3))^n + ((2-sqrt(3))^n))/2) \\ Colin Barker, Nov 21 2016
    
  • PARI
    Vec(2*x^3*(39 - 118*x + 55*x^2 - 7*x^3) / (1 - 4*x + x^2)^2 + O(x^30)) \\ Colin Barker, Nov 21 2016
  • Python
    def a278417(n):
        a = [0, 2, 14, 78, 388, 1810]
        if n < 6:
            return a[n]
        for k in range(n - 5):
            a = a[1:] + [7*a[-1] - 10*a[-2] - 10*a[-3] + 7*a[-4] - a[-5]]
        return a[-1]
    # David Radcliffe, May 09 2025
    

Formula

From Colin Barker, Nov 21 2016: (Start)
a(n) = 7*a(n-1) - 10*a(n-2) - 10*a(n-3) + 7*a(n-4) - a(n-5) for n>6.
G.f.: 2*x^3*(39 - 118*x + 55*x^2 - 7*x^3) / (1 - 4*x + x^2)^2.
(End)

Extensions

Entry revised by N. J. A. Sloane, May 13 2017
Showing 1-2 of 2 results.