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.

A006071 Maximal length of rook tour on an n X n board.

Original entry on oeis.org

1, 4, 14, 38, 76, 136, 218, 330, 472, 652, 870, 1134, 1444, 1808, 2226, 2706, 3248, 3860, 4542, 5302, 6140, 7064, 8074, 9178, 10376, 11676, 13078, 14590, 16212, 17952, 19810, 21794, 23904, 26148, 28526, 31046, 33708, 36520, 39482, 42602
Offset: 1

Views

Author

Keywords

References

  • M. Gardner, Knotted Doughnuts and Other Mathematical Entertainments. Freeman, NY, 1986, p. 76.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    A006071:=(1+z+4*z**2+6*z**3-5*z**4+z**5)/(z+1)/(z-1)**4; # conjectured (correctly) by Simon Plouffe in his 1992 dissertation

Formula

From R. J. Mathar, Mar 22 2009: (Start)
The sequence is a hybrid of two sequences at the even and odd indices with linear recurrences individually, therefore a linear recurrence in total.
For even n the Gardner reference gives the formula a(n)=n(2n^2-5)/3+2, which is
4,38,136,330,652,1134,1808,2706,3860,5302, n=2,4,6,8,...
with recurrence a(n)= 4 a(n-1) -6 a(n-2) +4 a(n-3) - a(n-4) and therefore with g.f. -2*(-2-11*x-4*x^2+x^3)/(x-1)^4 (offset 0) (see A152110).
For n odd the Gardner reference gives a(n)= n(2n^2-5)/3+1, which is
0,14,76,218,472,870,1444,2226,3248,4542,6140,8074,10376,13078, n=1,3,5,7,...
with the same recurrence and with g.f. -2*x*(-7-10*x+x^2)/(x-1)^4 (offset 0).
Since the first zero does not match the sequence and should be 1, we add 1 to the g.f.:
1,14,76,218,472,870,1444,2226,3248,4542,6140,8074,10376,13078,... (see A152100),
g.f.: 1-2*x*(-7-10*x+x^2)/(x-1)^4.
We "aerate" both sequences by insertion of zeros at each second position,
which implies x->x^2 in the generating functions,
4,0,38,0,136,0,330,0,652,0,1134,0,1808,0,2706,0,3860,0,5302
g.f. -2*(-2-11*x^2-4*x^4+x^6)/(x^2-1)^4 (offset 0).
1,0,14,0,76,0,218,0,472,0,870,0,1444,0,2226,0,3248,0,4542,0,6140,...
g.f. 1-2*x^2*(-7-10*x^2+x^4)/(x^2-1)^4.
The first of these is multiplied by x to shift it right by one place:
0,4,0,38,0,136,0,330,0,652,0,1134,0,1808,0,2706,0,3860,0,5302
g.f. -2*x*(-2-11*x^2-4*x^4+x^6)/(x^2-1)^4.
The sum of these two is
1-2*x^2*(-7-10*x^2+x^4)/(x^2-1)^4 -2*x*(-2-11*x^2-4*x^4+x^6)/(x^2-1)^4 =
(x^5-5x^4+6x^3+4x^2+x+1)/((x-1)^4/(x+1)).
This is exactly the Plouffe g.f. if the offset were 0.
In summary: a(n)= 3 a(n-1) -2 a(n-2) -2 a(n-3) +3 a(n-4) - a(n-5), n > 6.
a(2n)= 2+2*n*(8n^2-5)/3, n>=1. a(2n+1)= 2n(1+8n^2+12n)/3, n>=1.
G.f.: x*(x^5-5x^4+6x^3+4x^2+x+1)/((x-1)^4/(x+1)). (End)

Extensions

Edited (with more terms) by R. J. Mathar, Mar 22 2009

A152132 Maximal length of rook tour on an n X n+1 board.

Original entry on oeis.org

2, 8, 24, 54, 104, 174, 270, 396, 558, 756, 996, 1282, 1620, 2010, 2458, 2968, 3546, 4192, 4912, 5710, 6592, 7558, 8614, 9764, 11014, 12364, 13820, 15386, 17068, 18866, 20786, 22832, 25010, 27320, 29768, 32358, 35096, 37982, 41022, 44220, 47582
Offset: 1

Views

Author

R. J. Mathar, Mar 22 2009

Keywords

References

  • M. Gardner, Knotted Doughnuts and Other Mathematical Entertainments. Freeman, NY, 1986, p. 76.

Crossrefs

Programs

  • Magma
    I:=[2, 8, 24, 54, 104, 174, 270]; [n le 7 select I[n] else 3*Self(n-1) - 3*Self(n-2) + Self(n-3) + Self(n-4) - 3*Self(n-5) + 3*Self(n-6)- Self(n-7): n in [1..50]]; // Vincenzo Librandi, Dec 14 2012
  • Maple
    # Figure 43 of the Gardner book:
    C := proc(n,m)
    if type(m,even) and type(n,even) then
    2 ;
    elif type(m,odd) and type(n,odd) then
    1 ;
    elif type(m,even) and type(n,odd) and type(floor(n/2),even) then
    3/2 ;
    elif type(m,even) and type(n,odd) and type(floor(n/2),odd) then
    1/2 ;
    elif type(m,odd) and type(n,even) and type(floor(n/2),even) then
    0 ;
    elif type(m,odd) and type(n,even) and type(floor(n/2),odd) then
    1 ;
    fi;
    end:
    # formula for n X m boards, from the Gardner book:
    T := proc(n,m)
    n*(3*m^2+n^2-10)/6+C(n,m) ;
    end:
    for n from 1 to 24 do
    m := n+3 ; # third diagonal here, for example
    printf("%d,",T(n,m)) ;
    od:
  • Mathematica
    CoefficientList[Series[-2 * (-1 - x - 2*x^3 - 2*x^4 - 3*x^2 + x^5)/(1 + x)/(x^2 + 1)/(x - 1)^4, {x, 0, 40}], x] (* Vincenzo Librandi, Dec 14 2012 *)

Formula

G.f.: -2*x*(-1-x-2*x^3-2*x^4-3*x^2+x^5)/(1+x)/(x^2+1)/(x-1)^4.
a(n) = 3*a(n-1) -3*a(n-2) +a(n-3) +a(n-4) -3*a(n-5) +3*a(n-6) -a(n-7).
a(n) = 2*n^3/3+n^2-7*n/6+3/4-(-1)^n/4-A087960(n)/2.

Extensions

More terms from R. J. Mathar, Sep 22 2009

A152133 Maximal length of rook tour on an n X n+2 board.

Original entry on oeis.org

4, 16, 38, 78, 136, 220, 330, 474, 652, 872, 1134, 1446, 1808, 2228, 2706, 3250, 3860, 4544, 5302, 6142, 7064, 8076, 9178, 10378, 11676, 13080, 14590, 16214, 17952, 19812, 21794, 23906, 26148, 28528, 31046, 33710, 36520, 39484, 42602, 45882
Offset: 1

Views

Author

R. J. Mathar, Mar 22 2009

Keywords

References

  • M. Gardner, Knotted Doughnuts and Other Mathematical Entertainments. Freeman, NY, 1986, p. 76.

Crossrefs

Programs

  • Magma
    I:=[4,16,38,78,136]; [n le 5 select I[n] else 3*Self(n-1)-2*Self(n-2)-2*Self(n-3)+3*Self(n-4)-Self(n-5): n in [1..40]]; // Vincenzo Librandi, Dec 11 2012
  • Mathematica
    LinearRecurrence[{3,-2,-2,3,-1},{4,16,38,78,136},40] (* Harvey P. Dale, Dec 16 2011 *)

Formula

G.f.: -2*x*(-2-2*x+x^2-2*x^3+x^4)/(1+x)/(x-1)^4.
a(n) = 3*a(n-1) -2*a(n-2) -2*a(n-3) +3*a(n-4) -a(n-5).
a(n) = 2*n^3/3+2*n^2+n/3+3/2+(-1)^n/2. [R. J. Mathar, Oct 20 2009]

A152134 Maximal length of rook tour on an n X n+3 board.

Original entry on oeis.org

8, 24, 54, 102, 174, 270, 396, 556, 756, 996, 1282, 1618, 2010, 2458, 2968, 3544, 4192, 4912, 5710, 6590, 7558, 8614, 9764, 11012, 12364, 13820, 15386, 17066, 18866, 20786, 22832, 25008, 27320, 29768, 32358, 35094, 37982, 41022, 44220, 47580
Offset: 1

Views

Author

R. J. Mathar, Mar 22 2009

Keywords

References

  • M. Gardner, Knotted Doughnuts and Other Mathematical Entertainments. Freeman, NY, 1986, p. 76.

Crossrefs

Programs

  • Magma
    I:=[8, 24, 54, 102, 174, 270, 396]; [n le 7 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3)+Self(n-4)-3*Self(n-5)+3*Self(n-6)-Self(n-7): n in [1..40]];// Vincenzo Librandi, Dec 19 2012
  • Mathematica
    CoefficientList[Series[-2*(- 4 - 3*x^2 - 2*x^3 + x^4)/(1+x)/(x^2+1)/(x-1)^4, {x, 0, 40}], x] (* Vincenzo Librandi, Dec 18 2012 *)

Formula

G.f.: -2*x*(-4-3*x^2-2*x^3+x^4)/(1+x)/(x^2+1)/(x-1)^4.
a(n) = 17*n/6+3/4+2*n^3/3+3*n^2+A132429(n+3)/4. - R. J. Mathar, Sep 27 2009
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) + a(n-4) - 3*a(n-5) + 3*a(n-6) - a(n-7). - Vincenzo Librandi, Dec 19 2012

Extensions

More terms from R. J. Mathar, Sep 27 2009
Showing 1-4 of 4 results.