A032438 a(n) = n^2 - floor((n+1)/2)^2.
0, 0, 3, 5, 12, 16, 27, 33, 48, 56, 75, 85, 108, 120, 147, 161, 192, 208, 243, 261, 300, 320, 363, 385, 432, 456, 507, 533, 588, 616, 675, 705, 768, 800, 867, 901, 972, 1008, 1083, 1121, 1200, 1240, 1323, 1365, 1452, 1496, 1587, 1633, 1728, 1776, 1875, 1925
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..10000
- Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
Programs
-
Magma
[n^2-Floor( (n+1)/2 )^2 : n in [0..60]]; // Vincenzo Librandi, Sep 27 2011
-
Maple
A032438:=n->n^2-floor((n+1)/2)^2; seq(A032438(n), n=0..100) # Wesley Ivan Hurt, Nov 25 2013
-
Mathematica
Table[n^2-Floor[((n+1)/2)]^2,{n,0,50}] (* or *) LinearRecurrence[ {1,2,-2,-1,1},{0,0,3,5,12},51]
-
PARI
a(n)=n^2 - ((n+1)\2)^2 \\ Charles R Greathouse IV, Feb 19 2017
Formula
a(n) = n^2 - A008794(n+1).
G.f.: x^2*(x^2 + 2*x + 3)/(1-x^2)^2/(1-x). - Ralf Stephan, Jun 10 2003
a(n) = (1/8)*(2*n*(3*n-1)+(2*n+1)*(-1)^n-1). a(-n-1) = A014255(n). - Bruno Berselli, Sep 27 2011
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5), n > 4. - Harvey P. Dale, Nov 24 2011
E.g.f.: (x*(1 + 3*x)*cosh(x) + (3*x^2 + 3*x - 1)*sinh(x))/4. - Stefano Spezia, Aug 01 2022
Comments