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.
%I A187277 #22 Feb 19 2024 11:43:17 %S A187277 1,16,57,136,265,456,721,1072,1521,2080,2761,3576,4537,5656,6945,8416, %T A187277 10081,11952,14041,16360,18921,21736,24817,28176,31825,35776,40041, %U A187277 44632,49561,54840,60481,66496,72897,79696,86905,94536,102601,111112,120081,129520,139441,149856,160777,172216,184185 %N A187277 Let S denote the palindromes in the language {0,1,2,...,n-1}*; a(n) = number of words of length 4 in the language SS. %H A187277 G. C. Greubel, <a href="/A187277/b187277.txt">Table of n, a(n) for n = 1..1000</a> %H A187277 R. Kemp, <a href="http://dx.doi.org/10.1016/0012-365X(82)90123-6">On the number of words in the language {w in Sigma* | w = w^R }^2</a>, Discrete Math., 40 (1982), 225-234. See Table 1. %F A187277 From _Colin Barker_, Jul 24 2013: (Start) (Conjectured formulas; later proven) %F A187277 a(n) = n*(2*n^2 +n -2). %F A187277 G.f.: x*(1 +12*x - x^2)/(x-1)^4. (End) %F A187277 The above conjecture is true: A284873(4, n) evaluates to the same polynomial. - _Andrew Howroyd_, Oct 10 2017 %p A187277 Using the Maple code from A007055: [seq(F(b,4),b=1..50)]; %t A187277 Array[# (2 #^2 + # - 2) &, 45] (* or *) %t A187277 Rest@ CoefficientList[Series[-x (x^2 - 12 x - 1)/(x - 1)^4, {x, 0, 45}], x] (* _Michael De Vlieger_, Oct 10 2017 *) %o A187277 (PARI) a(n) = 2*n^3 + n^2 - 2*n; \\ _Andrew Howroyd_, Oct 10 2017 %o A187277 (Magma) [2*n^3 + n^2 - 2*n: n in [1..50]]; // _G. C. Greubel_, Jul 25 2018 %o A187277 (Python) %o A187277 def A187277(n): return n*(n*((n<<1)|1)-2) # _Chai Wah Wu_, Feb 19 2024 %Y A187277 Row 4 of A284873. %K A187277 nonn %O A187277 1,2 %A A187277 _N. J. A. Sloane_, Mar 07 2011