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

A018836 Number of squares on infinite chessboard at <= n knight's moves from a fixed square.

Original entry on oeis.org

1, 9, 41, 109, 205, 325, 473, 649, 853, 1085, 1345, 1633, 1949, 2293, 2665, 3065, 3493, 3949, 4433, 4945, 5485, 6053, 6649, 7273, 7925, 8605, 9313, 10049, 10813, 11605, 12425, 13273, 14149, 15053, 15985, 16945, 17933, 18949, 19993, 21065, 22165
Offset: 0

Views

Author

Keywords

Comments

Apparently also the number of distinct squares reachable by the (1,3)-leaper in at most n moves. - R. J. Mathar, Jan 05 2018

Crossrefs

Partial sums of A018842. Cf. A098498 (half-infinite board), A001844 (1,1)-leaper, A297740 (2,3)-leaper, A297741 (3,4)-leaper.

Programs

  • Maple
    (1 + 5*x + 12*x^2 - 8*x^4 + 4*x^5)*(1+x)/(1-x)^3; seq(coeff(series(%, x, n+1), x, n), n=0..50);
  • Mathematica
    Table[1-6 n+14 n^2+4 Sign[n(n-1)(n-3)], {n, 0, 50}] (* Zak Seidov *)
    Join[{1,9,41,109},LinearRecurrence[{3,-3,1},{205,325,473},50]] (* Harvey P. Dale, Aug 16 2011 *)
    CoefficientList[Series[(1 + 5*x + 12*x^2 - 8*x^4 + 4*x^5)*(1 + x)/(1 - x)^3, {x, 0, 40}], x] (* Vincenzo Librandi, Dec 26 2012 *)

Formula

G.f.: (1+5*x+12*x^2-8*x^4+4*x^5)*(1+x)/(1-x)^3;
a(n) = 1-6*n+14*n^2+4*sign(n*(n-1)*(n-3)). - Zak Seidov, Mar 01 2005

A038522 On a (2n+1) X (2n+1) board, let m(i) be the number of squares that are i knight's moves from center; sequence gives max m(i) for i >= 0.

Original entry on oeis.org

1, 1, 8, 20, 32, 52, 68, 76, 96, 96, 120, 120, 148, 148, 176, 176, 204, 204, 232, 232, 260, 260, 288, 288, 316, 316, 344, 344, 372, 372, 400, 400, 428, 428, 456, 456, 484, 484, 512, 512, 540, 540, 568, 568, 596, 596, 624, 624, 652, 652, 680, 680, 708, 708
Offset: 0

Views

Author

Antreas P. Hatzipolakis (xpolakis(AT)hol.gr)

Keywords

Examples

			On a 5 X 5 board, [ m(0),...,m(4) ]=[ 1,8,8,4,4 ], max=8, so a(2)=8.
		

Crossrefs

Cf. A018842.

Programs

  • Mathematica
    LinearRecurrence[{1,1,-1},{1,1,8,20,32,52,68,76,96,96,120,120,148},60] (* Harvey P. Dale, Apr 15 2020 *)
  • PARI
    Vec((1 + x^2)*(1 + 5*x^2 + 12*x^3 - 4*x^5 + 4*x^6 - 8*x^7 + 4*x^10) / ((1 - x)^2*(1 + x)) + O(x^50)) \\ Colin Barker, Mar 16 2020

Formula

a(n) = 28*floor(n/2) - 20 for n >= 10. - Andrew Howroyd, Feb 28 2020
From Stefano Spezia, Feb 29 2020: (Start)
G.f.: (1 + 6*x^2 + 12*x^3 + 5*x^4 + 8*x^5 + 4*x^6 - 12*x^7 + 4*x^8 - 8*x^9 + 4*x^10 + 4*x^12)/((1 - x)^2*(1 + x)).
a(n) = a(n-1) + a(n-2) - a(n-3) for n > 12. (End)

Extensions

Corrected and additional terms added by Andrew Howroyd, Feb 28 2020

A118312 Number of squares on infinite chessboard that a knight can reach in n moves from a fixed square.

Original entry on oeis.org

1, 8, 33, 76, 129, 196, 277, 372, 481, 604, 741, 892, 1057, 1236, 1429, 1636, 1857, 2092, 2341, 2604, 2881, 3172, 3477, 3796, 4129, 4476, 4837, 5212, 5601, 6004, 6421, 6852, 7297, 7756, 8229, 8716, 9217, 9732, 10261, 10804, 11361, 11932, 12517, 13116, 13729, 14356, 14997, 15652
Offset: 0

Views

Author

Anton Chupin (chupin(AT)icmm.ru), May 14 2006

Keywords

Comments

Related to A018842: a(n) = A018842(n) + A018842(n-2) + A018842(n-4) + ... .

Examples

			a(2)=33 because knight in 2 moves from square (0,0) can reach one of the following squares: {{0,0}, {-4,-2}, {-4,0}, {-4,2}, {-3,-3}, {-3,-1}, {-3,1}, {-3,3}, {-2,-4}, {-2,0}, {-2,4}, {-1,-3}, {-1,-1}, {-1,1}, {-1,3}, {0,-4}, {0,-2}, {0,2}, {0,4}, {1,-3}, {1,-1}, {1,1}, {1,3}, {2,-4}, {2,0}, {2,4}, {3,-3}, {3,-1}, {3,1}, {3,3}, {4,-2}, {4,0}, {4,2}}.
		

References

  • M. Petkovic, Mathematics and Chess, Dover Publications (2003), Problem 3.11.

Crossrefs

Cf. A005892, A018842 (squares in EXACTLY n moves), A018836 (squares in <=n moves).

Programs

  • Magma
    I:=[1, 8, 33, 76, 129, 196, 277]; [n le 7 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-3): n in [1..50]]; // Vincenzo Librandi, Jul 09 2012
    
  • Mathematica
    Table[ -3 + 4*n + 7*n^2 + 4*Sign[(n - 2)(n - 1)], {n, 0, 100}]
    CoefficientList[Series[(1+5*x+12*x^2-8*x^4+4*x^5)/(1-x)^3,{x,0,50}],x] (* Vincenzo Librandi, Jul 09 2012 *)
    Join[{1,8,33},LinearRecurrence[{3,-3,1},{76,129,196},50]] (* Harvey P. Dale, Dec 05 2014 *)
  • PARI
    a(n)=7*n^2 + 4*n - 3 + 4*sign((n-2)*(n-1)) \\ Charles R Greathouse IV, Feb 09 2017

Formula

a(n) = -3 + 4*n + 7*n^2 + 4*sign((n-2)*(n-1)).
G.f.: (1 + 5*x + 12*x^2 - 8*x^4 + 4*x^5)/(1 - x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Vincenzo Librandi, Jul 09 2012
For n >= 3, a(n) = A005892(n).
E.g.f.: exp(x)*(1 + 11*x + 7*x^2) - 2*x*(x + 2). - Stefano Spezia, Jul 27 2022

Extensions

Link updated by Tristan Miller, Jun 13 2013
Showing 1-3 of 3 results.