OFFSET
0,4
REFERENCES
Paul Vanderlind, Richard K. Guy, and Loren C. Larson, The Inquisitive Problem Solver, MAA, 2002. See Problem 252, pages 67, 87, 198 and 276.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
F. Michel Dekking, Jeffrey Shallit, and N. J. A. Sloane, Queens in exile: non-attacking queens on infinite chess boards, Electronic J. Combin., 27:1 (2020), #P1.52.
Gabriel Nivasch and Eyal Lev, Nonattacking Queens on a Triangle, Mathematics Magazine, Vol. 78, No. 5 (Dec., 2005), pp. 399-403.
Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
FORMULA
Except for n=4, this is round(2n/3).
From Colin Barker, Jul 02 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>5.
G.f.: x*(1+x^2-x^3)*(1+x^4)/((1-x)^2*(1+x+x^2)). (End)
a(n) = 2*(3*n + sqrt(3)*sin((2*Pi*n)/3)) / 9. - Colin Barker, Mar 08 2017
EXAMPLE
n=3:
OOX
XO
O
n=4:
OOOX
OXO
OO
O
n=5:
OOOOX
OOXO
XOO
OO
O
MATHEMATICA
CoefficientList[Series[x*(1 +x^2 -x^3)*(1 +x^4)/((1-x)^2*(1+x+x^2)), {x, 0, 50}], x] (* G. C. Greubel, Jul 03 2016 *)
PROG
(PARI) concat(0, Vec(x*(1+x^2-x^3)*(1+x^4)/((1-x)^2*(1+x+x^2)) + O(x^100))) \\ Colin Barker, Jul 02 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Rob Pratt and N. J. A. Sloane, Jul 01 2016
STATUS
approved