login
A227316
a(n) = n(n+1) if n == 0 or 1 (mod 4), otherwise a(n) = n(n+1)/2.
3
0, 2, 3, 6, 20, 30, 21, 28, 72, 90, 55, 66, 156, 182, 105, 120, 272, 306, 171, 190, 420, 462, 253, 276, 600, 650, 351, 378, 812, 870, 465, 496, 1056, 1122, 595, 630, 1332, 1406, 741, 780, 1640, 1722, 903, 946, 1980, 2070, 1081, 1128
OFFSET
0,2
LINKS
FORMULA
a(n) = A130658(n+2)*A000217(n), a(-n-1) = A130658(n)*A000217(n).
a(2n) = A169642(n), a(2n+1) = 2*(2*n+1)*A026741(n+1).
a(n) = A176743(n-2)*A176743(n-1).
a(n) = A177002(n+2)*A064038(n+1).
a(n) = 3*a(n-1) -6*a(n-2) +10*a(n-3) -12*a(n-4) +12*a(n-5) -10*(n-6) +6*(n-7) -3*a(n-8) +a(n-9) = 3*a(n-4) -3*a(n-8) +a(n-12).
G.f.: x*(2-3*x+9*x^2+3*x^5+x^6)/((1-x)^3*(1+x^2)^3). - Bruno Berselli, Jul 10 2013
a(n) = (3+(-1)^floor(n/2))*n*(n+1)/4. - Bruno Berselli, Jul 10 2013
Sum_{n>=1} 1/a(n) = 1 + log(2)/2. - Amiram Eldar, Aug 12 2022
EXAMPLE
a(0) = 2*0 = 0, a(1) = 2*1 = 2, a(2) = 1*3 = 3, a(3) = 1*6 = 6, a(4) = 2*10 = 20.
MATHEMATICA
a[n_] := n*(n+1)/4*GCD[n-1, 4]*GCD[n, 4]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jul 10 2013 *)
Table[If[Mod[n, 4]<2, n(n+1), (n(n+1))/2], {n, 0, 50}] (* or *) LinearRecurrence[ {3, -6, 10, -12, 12, -10, 6, -3, 1}, {0, 2, 3, 6, 20, 30, 21, 28, 72}, 50] (* Harvey P. Dale, Aug 26 2016 *)
PROG
(Magma) [(3+(-1)^Floor(n/2))*n*(n+1)/4: n in [0..50]]; // Bruno Berselli, Jul 10 2013
CROSSREFS
Cf. A000217, A002378, A130658, A169642 (first bisection), A176743, A109043, A227380.
Sequence in context: A254441 A336461 A173744 * A176806 A323464 A168268
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Jul 06 2013
STATUS
approved