OFFSET
0,2
COMMENTS
Even numbers of the form n*(n+1)/2.
Even generalized hexagonal numbers. - Omar E. Pol, Apr 24 2016
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).
FORMULA
a(n) = (2*n+1)*(2*n+1-(-1)^n)/2. - Ant King, Nov 18 2010
a(n) = a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5). - Ant King, Nov 18 2010
G.f.: -2*x*(3*x^2+2*x+3)/((x+1)^2*(x-1)^3). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 10 2009
a(n) = A014493(n+1)-(2n+1)*(-1)^n. - R. J. Mathar, Sep 15 2009
a(n) = A193867(n+1) - 1. - Omar E. Pol, Aug 17 2011
Sum_{n>=1} 1/a(n) = 2 - Pi/2. - Robert Bilinski, Jan 20 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = 3*log(2)-2. - Amiram Eldar, Mar 06 2022
MATHEMATICA
Table[2Ceiling[n/2]*(2n + 1), {n, 0, 47}] (* Robert G. Wilson v, Nov 05 2004 *)
1/2 (2#+1)(2#+1-(-1)^#) &/@Range[0, 47] (* Ant King, Nov 18 2010 *)
Select[1/2 #(#+1) &/@Range[0, 95], EvenQ] (* Ant King, Nov 18 2010 *)
PROG
(Magma) [1/2*(2*n+1)*(2*n+1-(-1)^n): n in [0..50]]; // Vincenzo Librandi, Aug 18 2011
(PARI) a(n)=(2*n+1)*(2*n+1-(-1)^n)/2 \\ Charles R Greathouse IV, Oct 07 2015
(Python)
def A014494(n): return (2*n+1)*(n+n%2) # Chai Wah Wu, Mar 11 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Erich Friedman
STATUS
approved