OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
R. Kemp, On the number of words in the language {w in Sigma* | w = w^R }^2, Discrete Math., 40 (1982), 225-234. See Table 1.
FORMULA
From Colin Barker, Jul 24 2013: (Start) (Conjectured formulas; later proven)
a(n) = n*(2*n^2 +n -2).
G.f.: x*(1 +12*x - x^2)/(x-1)^4. (End)
The above conjecture is true: A284873(4, n) evaluates to the same polynomial. - Andrew Howroyd, Oct 10 2017
MAPLE
Using the Maple code from A007055: [seq(F(b, 4), b=1..50)];
MATHEMATICA
Array[# (2 #^2 + # - 2) &, 45] (* or *)
Rest@ CoefficientList[Series[-x (x^2 - 12 x - 1)/(x - 1)^4, {x, 0, 45}], x] (* Michael De Vlieger, Oct 10 2017 *)
PROG
(PARI) a(n) = 2*n^3 + n^2 - 2*n; \\ Andrew Howroyd, Oct 10 2017
(Magma) [2*n^3 + n^2 - 2*n: n in [1..50]]; // G. C. Greubel, Jul 25 2018
(Python)
def A187277(n): return n*(n*((n<<1)|1)-2) # Chai Wah Wu, Feb 19 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Mar 07 2011
STATUS
approved