OFFSET
0,3
COMMENTS
Multiplicative because A022998 is. - Andrew Howroyd, Jul 26 2018
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (0,3,0,-3,0,1).
FORMULA
a(2*n) = 8*n^2 = A139098(n).
a(2*n+1) = 1 + 4*n + 4*n^2 = A016754(n).
From Colin Barker, Apr 01 2012: (Start)
a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6).
G.f.: x*(1+8*x+6*x^2+8*x^3+x^4)/((1-x)^3*(1+x)^3). (End)
a(n) = numerator(2*n^2/(n^2+1)). - Vincenzo Librandi, Aug 19 2014
From Amiram Eldar, Feb 22 2022: (Start)
Sum_{n>=1} 1/a(n) = 7*Pi^2/48.
Sum_{n>=1} (-1)^(n+1)/a(n) = 5*Pi^2/48. (End)
From G. C. Greubel, Aug 01 2022: (Start)
a(n) = n^2*(3 + (-1)^n)/2.
E.g.f.: (1/2)*x*(-1 + x + 3*(1 + x)*exp(2*x)). (End)
MATHEMATICA
LinearRecurrence[{0, 3, 0, -3, 0, 1}, {0, 1, 8, 9, 32, 25}, 50] (* Harvey P. Dale, Dec 01 2018 *)
PROG
(Haskell)
a181900 n = a022998 n * n
(PARI) a(n)=if(n%2, n^2, 2*n^2) \\ Charles R Greathouse IV, Aug 07 2012
(Magma) [Numerator(2*n^2/(n^2+1)): n in [0..50]]; // Vincenzo Librandi, Aug 19 2014
(SageMath) [n^2*(1 + ((n+1)%2)) for n in (0..60)] # G. C. Greubel, Aug 01 2022
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Reinhard Zumkeller, Mar 31 2012
STATUS
approved