|
|
A103832
|
|
For even n, a(n)=2n+1, for odd n, a(n)=n(n+1)
|
|
2
|
|
|
1, 2, 5, 12, 9, 30, 13, 56, 17, 90, 21, 132, 25, 182, 29, 240, 33, 306, 37, 380, 41, 462, 45, 552, 49, 650, 53, 756, 57, 870, 61, 992, 65, 1122, 69, 1260, 73, 1406, 77, 1560, 81, 1722, 85, 1892, 89, 2070, 93, 2256, 97, 2450, 101, 2652, 105, 2862, 109, 3080, 113
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
First the sum then the product of two successive integers.
|
|
LINKS
|
|
|
FORMULA
|
G.f.: (1+3x^2)(1+2x-x^2)/((1-x)^3*(1+x)^3). [R. J. Mathar, Aug 30 2008]
a(n) = (n^2+3*n+1-(n^2-n-1)*(-1)^n)/2. - Luce ETIENNE, Apr 13 2016
E.g.f.: (2*x+1)*cosh(x) + (x^2 + 2*x)*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=9, a(5)=5*6=30.
|
|
MAPLE
|
seq(2*n+1+(n mod 2)*(n^2-n-1), n=0..100); # Robert Israel, Apr 14 2016
|
|
MATHEMATICA
|
Flatten[Table[{i + i + 1, (i + 1)(i + 2)}, {i, 0, 98, 2}]]
LinearRecurrence[{0, 3, 0, -3, 0, 1}, {1, 2, 5, 12, 9, 30}, 60] (* Harvey P. Dale, Oct 07 2016 *)
|
|
PROG
|
(Python)
for n in range(0, 10**3):
print((int)((n**2+3*n+1-(n**2-n-1)*(-1)**n)/2))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Corrected typo in the definition - R. J. Mathar, Sep 07 2010
|
|
STATUS
|
approved
|
|
|
|