OFFSET
1,2
COMMENTS
Rotations and reflections of a placement are counted. If they are to be ignored, see A296996.
The condition of placements is also known as "no 3-term arithmetic progressions".
LINKS
Heinrich Ludwig, Table of n, a(n) for n = 1..256
Index entries for linear recurrences with constant coefficients, signature (5,-8,0,14,-14,0,8,-5,1).
FORMULA
a(n) = (n^6 - 3*n^4 - 3*n^3 + 8*n^2)/6 - (n == 1 (mod 2))*n/2.
a(n) = (n^6 - 3*n^4 - 3*n^3 + 8*n^2)/6 for n even,
a(n) = (n^6 - 3*n^4 - 3*n^3 + 8*n^2 - 3*n)/6 for n odd.
From Colin Barker, Dec 23 2017: (Start)
G.f.: 2*x^2*(2 + 29*x + 93*x^2 + 82*x^3 + 32*x^4 + x^5 + x^6) / ((1 - x)^7*(1 + x)^2).
a(n) = 5*a(n-1) - 8*a(n-2) + 14*a(n-4) - 14*a(n-5) + 8*a(n-7) - 5*a(n-8) + a(n-9) for n>9.
(End)
MATHEMATICA
Array[(#^6 - 3 #^4 - 3 #^3 + 8 #^2)/6 - # Boole[OddQ@ #]/2 &, 32] (* Michael De Vlieger, Dec 23 2017 *)
CoefficientList[ Series[-2x (2 + 29x + 93x^2 + 82x^3 + 32x^4 + x^5 + x^6)/((x - 1)^7 (x + 1)^2), {x, 0, 31}], x] (* or *)
LinearRecurrence[{5, -8, 0, 14, -14, 0, 8, -5, 1}, {0, 4, 78, 544, 2260, 7068, 18298, 41472, 85032}, 32] (* Robert G. Wilson v, Jan 15 2018 *)
PROG
(PARI) concat(0, Vec(2*x^2*(2 + 29*x + 93*x^2 + 82*x^3 + 32*x^4 + x^5 + x^6) / ((1 - x)^7*(1 + x)^2) + O(x^40))) \\ Colin Barker, Dec 23 2017
KEYWORD
nonn,easy
AUTHOR
Heinrich Ludwig, Dec 23 2017
STATUS
approved