login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A321129
Numerator of Sum_{k=1..n} (k*sin((Pi*k)/3))/sqrt(3).
1
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,2
COMMENTS
The denominators are 2,2,2,1,1,2,2,2,1,1,2,2,2,1,1,...
LINKS
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
EXAMPLE
For n = 1 the sum is simply 1*sin((Pi*1)/3)/sqrt(3) = 1/2. So, a(1) = 1.
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 *)
PROG
I:=[1, 3, 3, -1, -3, -3, 1, 9, 9, -1, -6]; [n le 11 select I[n] else Self(n-1)- Self(n-2)+Self(n-3)-Self(n-4)+Self(n-5)+Self(n-6)-Self(n-7)+Self(n-8)- Self(n-9)+Self(n-10)-Self(n-11): n in [1..100]]; // Vincenzo Librandi, Oct 28 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
CROSSREFS
Sequence in context: A264526 A138071 A206400 * A278265 A171369 A111629
KEYWORD
sign,frac,easy
AUTHOR
Peter James Foreman, Oct 27 2018
EXTENSIONS
More terms from Vincenzo Librandi, Oct 28 2018
STATUS
approved