login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A110344
a(n) = Sum_{k=0..n-1} (n+k) = n(3n-1)/2 if n is even; a(n) = Sum_{k=0..n-1} (n-k) = n(n+1)/2 if n is odd.
2
1, 5, 6, 22, 15, 51, 28, 92, 45, 145, 66, 210, 91, 287, 120, 376, 153, 477, 190, 590, 231, 715, 276, 852, 325, 1001, 378, 1162, 435, 1335, 496, 1520, 561, 1717, 630, 1926, 703, 2147, 780, 2380, 861, 2625, 946, 2882, 1035, 3151, 1128, 3432, 1225, 3725, 1326
OFFSET
1,2
FORMULA
From Emeric Deutsch, Aug 01 2005: (Start)
a(2n+1) = A000217(2n+1) = (n+1)(2n+1) (triangular numbers with odd index).
a(2n) = A000326(2n) = A049452(n) = n(6n-1) (pentagonal numbers with even index).
(End)
a(n) = n*( 2*n + (n-1)*(-1)^n )/2. - Luce ETIENNE, Jul 08 2014
From Colin Barker, Feb 17 2015: (Start)
a(n) = 3*a(n-2)-3*a(n-4)+a(n-6).
G.f.: -x*(7*x^3+3*x^2+5*x+1) / ((x-1)^3*(x+1)^3). (End)
Sum_{n>=1} 1/a(n) = 4*log(2) + 3*log(3)/2 - sqrt(3)*Pi/2. - Amiram Eldar, Sep 11 2022
EXAMPLE
a(3) = 3 + 2 +1 = 6.
a(6) = 6 + 7 + 8 + 9 + 10 + 11 = 51.
MAPLE
a:=proc(n) if n mod 2=0 then n*(3*n-1)/2 else n*(n+1)/2 fi end: seq(a(n), n=1..60); # Emeric Deutsch
MATHEMATICA
a[n_] := n*(2*n + (n - 1)*(-1)^n)/2; Array[a, 50] (* Amiram Eldar, Sep 11 2022 *)
PROG
(PARI) Vec(-x*(7*x^3+3*x^2+5*x+1)/((x-1)^3*(x+1)^3) + O(x^100)) \\ Colin Barker, Feb 17 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Jul 20 2005
EXTENSIONS
More terms from Emeric Deutsch, Aug 01 2005
STATUS
approved