|
|
A103831
|
|
For even n, a(n) = n*(n+1), for odd n, a(n) = 2*n + 1.
|
|
2
|
|
|
0, 3, 6, 7, 20, 11, 42, 15, 72, 19, 110, 23, 156, 27, 210, 31, 272, 35, 342, 39, 420, 43, 506, 47, 600, 51, 702, 55, 812, 59, 930, 63, 1056, 67, 1190, 71, 1332, 75, 1482, 79, 1640, 83, 1806, 87, 1980, 91, 2162, 95, 2352, 99, 2550, 103, 2756, 107, 2970, 111, 3192, 115
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
First the product then the sum of two successive integers.
|
|
LINKS
|
|
|
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)
(Magma) [IsOdd(n) select (2*n+1) else n*(n+1): n in [0..52]]; // Vincenzo Librandi, Apr 14 2016
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|