OFFSET
1,2
COMMENTS
Maximal number of squares that can be covered by a queen on an n X n chessboard. - Reinhard Zumkeller, Dec 15 2008
LINKS
Muniru A Asiru, Table of n, a(n) for n = 1..5000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
FORMULA
From R. J. Mathar, Oct 29 2008: (Start)
G.f.: x*(1+3*x+4*x^2)/((1+x)*(1-x)^2).
a(n) = a(n-2) + 8.
a(n) + a(n+1) = A004770(n).
a(n+1) - a(n) = A010703(n). (End)
a(n) = 8*floor((n-1)/2) + 4 - 3*(n mod 2). - Reinhard Zumkeller, Dec 15 2008
a(n) = A153125(n,n). - Reinhard Zumkeller, Dec 20 2008
a(n) = 8*n - a(n-1) - 11 (with a(1)=1). - Vincenzo Librandi, Aug 06 2010
a(n) = 4*n - (7 + (-1)^n)/2. - Arkadiusz Wesolowski, Sep 18 2012
a(1)=1, a(2)=4, a(3)=9, a(n) = a(n-1) + a(n-2) - a(n-3). - Harvey P. Dale, Jun 18 2013
From Franck Maminirina Ramaharo, Jul 22 2018: (Start)
a(n) = A047470(n) + 1.
E.g.f.: (8 - exp(-x) + (8*x - 7)*exp(x))/2. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = (sqrt(2)+1)*Pi/16 + log(2)/4 + sqrt(2)*arccoth(sqrt(2))/8. - Amiram Eldar, Dec 11 2021
MAPLE
seq(coeff(series(factorial(n)*((8-exp(-x)+(8*x-7)*exp(x))/2), x, n+1), x, n), n=1..60); # Muniru A Asiru, Jul 23 2018
MATHEMATICA
Flatten[(#+{1, 4})&/@(8Range[0, 30])] (* or *) LinearRecurrence[ {1, 1, -1}, {1, 4, 9}, 60] (* Harvey P. Dale, Jun 18 2013 *)
CoefficientList[ Series[(4x^2 + 3x + 1)/((x + 1) (x - 1)^2), {x, 0, 58}], x] (* Robert G. Wilson v, Jul 24 2018 *)
PROG
(Maxima) makelist(4*n -(7 + (-1)^n)/2, n, 1, 100); /* Franck Maminirina Ramaharo, Jul 22 2018 */
(GAP) Filtered([1..250], n->n mod 8=1 or n mod 8 =4); # Muniru A Asiru, Jul 23 2018
(Magma) [4*n-3 - ((n+1) mod 2): n in [1..70]]; // G. C. Greubel, Mar 15 2024
(SageMath) [4*n-3 - ((n+1)%2) for n in range(1, 71)] # G. C. Greubel, Mar 15 2024
(Python)
def A047461(n): return (n-1<<2)|(n&1) # Chai Wah Wu, Mar 30 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved