OFFSET
0,2
COMMENTS
First the product then the sum of two successive integers.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..5000
Index entries for linear recurrences with constant coefficients, signature (0,3,0,-3,0,1).
FORMULA
G.f.: (6*x^5+3*x^4-18*x^3-10*x^2+20*x+7) / (1-x)^3*(1+x)^3.
a(n) = (n^2+3*n+1+(n^2-n-1)*(-1)^n)/2. - Luce ETIENNE, Apr 13 2016
E.g.f.: (x^2 + 2*x)*cosh(x) + (2*x + 1)*sinh(x). - Ilya Gutkovskiy, Apr 13 2016
a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6). - G. C. Greubel, Apr 13 2016
EXAMPLE
a(4)=4*5=20, a(5)=5+6=11.
MATHEMATICA
Flatten[Table[{i + i + 1, (i + 1)(i + 2)}, {i, 1, 99, 2}]]
PROG
(Python)
for n in range(0, 10**3):
print((n**2+3*n+1+(n**2-n-1)*(-1)**n)/2)
# Soumil Mandal, Apr 14 2016
(Magma) [IsOdd(n) select (2*n+1) else n*(n+1): n in [0..52]]; // Vincenzo Librandi, Apr 14 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Feb 17 2005, Feb 18 2005
EXTENSIONS
Edited by N. J. A. Sloane, Aug 29 2008 at the suggestion of R. J. Mathar
STATUS
approved