OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
a(n) = floor((2*n + 1/8)^2).
a(n+1) - a(n) = A173512(n).
a(2*n) = A157474(n) for n>0.
From - R. J. Mathar, Feb 21 2010: (Start)
a(n)= 2*a(n-1) -2*a(n-3) +a(n-4).
G.f.: -x*(4+9*x+3*x^2)/((1+x)*(x-1)^3). (End)
E.g.f.: (x*(8*x + 9)*cosh(x) + (8*x^2 + 9*x - 1)*sinh(x))/2. - Stefano Spezia, Apr 24 2024
EXAMPLE
a(6) = 147; 4(6)^2 + floor(6/3) = 144 + 3 = 147.
MAPLE
MATHEMATICA
Table[4n^2 + Floor[n/2], {n, 0, 100}] (* Wesley Ivan Hurt, Nov 01 2013 *)
LinearRecurrence[{2, 0, -2, 1}, {0, 4, 17, 37}, 50] (* Harvey P. Dale, Nov 23 2019 *)
PROG
(PARI) a(n) = 4*n^2 + n\2 \\ Charles R Greathouse IV, Jun 11 2015
(Python)
def A173511(n): return (n**2<<2)+(n>>1) # Chai Wah Wu, Jan 18 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Feb 20 2010
STATUS
approved