A321129 Numerator of Sum_{k=1..n} (k*sin((Pi*k)/3))/sqrt(3).
1, 3, 3, -1, -3, -3, 1, 9, 9, -1, -6, -6, 1, 15, 15, -1, -9, -9, 1, 21, 21, -1, -12, -12, 1, 27, 27, -1, -15, -15, 1, 33, 33, -1, -18, -18, 1, 39, 39, -1, -21, -21, 1, 45, 45, -1, -24, -24, 1, 51, 51, -1, -27, -27, 1, 57, 57, -1, -30, -30, 1, 63, 63, -1, -33
Offset: 1
Examples
For n = 1 the sum is simply 1*sin((Pi*1)/3)/sqrt(3) = 1/2. So, a(1) = 1.
Links
- Colin Barker, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (1,-1,1,-1,1,1,-1,1,-1,1,-1).
Programs
-
Maple
a:=n->add((k*sin((Pi*k)/3))/sqrt(3),k=1..n): seq(numer(a(n)),n=1..50); # Muniru A Asiru, Oct 28 2018
-
Mathematica
a[n_]:=Numerator[Sum[(k*Sin[(Pi*k)/3])/Sqrt[3], {k,1,n}]]; Array[a, 50] (* or *) LinearRecurrence[{1, -1, 1, -1, 1, 1, -1, 1, -1, 1, -1}, {1, 3, 3, -1, -3, -3, 1, 9, 9, -1, -6}, 50] (* Stefano Spezia, Oct 27 2018 *)
-
PARI
Vec(x*(1 + 2*x + x^2 - 2*x^3 - x^4 - 2*x^5 + x^6 + 2*x^7 + x^8) / ((1 - x)^2*(1 + x)*(1 - x + x^2)^2*(1 + x + x^2)^2) + O(x^80)) \\ Colin Barker, Oct 28 2018
Formula
a(3n+1) = (-1)^n.
a(6n-1) = a(6n) = -3n.
a(6n+2) = a(6n+3) = 6n+3.
a(n) = Numerator of ((n+1)*sin((n*Pi)/3)-n*sin(((n+1)*Pi)/3))/sqrt(3).
a(n) = a(n - 1) - a(n - 2) + a(n - 3) - a(n - 4) + a(n - 5) + a(n - 6) - a(n - 7) + a(n - 8) - a(n - 9) + a(n - 10) - a(n - 11) for n > 11. - Stefano Spezia, Oct 27 2018
G.f.: x*(1 + 2*x + x^2 - 2*x^3 - x^4 - 2*x^5 + x^6 + 2*x^7 + x^8) / ((1 - x)^2*(1 + x)*(1 - x + x^2)^2*(1 + x + x^2)^2). - Colin Barker, Oct 28 2018
Extensions
More terms from Vincenzo Librandi, Oct 28 2018
Comments