This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A321129 #31 Nov 24 2018 14:24:34 %S A321129 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, %T A321129 27,27,-1,-15,-15,1,33,33,-1,-18,-18,1,39,39,-1,-21,-21,1,45,45,-1, %U A321129 -24,-24,1,51,51,-1,-27,-27,1,57,57,-1,-30,-30,1,63,63,-1,-33 %N A321129 Numerator of Sum_{k=1..n} (k*sin((Pi*k)/3))/sqrt(3). %C A321129 The denominators are 2,2,2,1,1,2,2,2,1,1,2,2,2,1,1,... %H A321129 Colin Barker, <a href="/A321129/b321129.txt">Table of n, a(n) for n = 1..1000</a> %H A321129 <a href="/index/Rec#order_11">Index entries for linear recurrences with constant coefficients</a>, signature (1,-1,1,-1,1,1,-1,1,-1,1,-1). %F A321129 a(3n+1) = (-1)^n. %F A321129 a(6n-1) = a(6n) = -3n. %F A321129 a(6n+2) = a(6n+3) = 6n+3. %F A321129 a(n) = Numerator of ((n+1)*sin((n*Pi)/3)-n*sin(((n+1)*Pi)/3))/sqrt(3). %F A321129 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 %F A321129 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 %e A321129 For n = 1 the sum is simply 1*sin((Pi*1)/3)/sqrt(3) = 1/2. So, a(1) = 1. %p A321129 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 %t A321129 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 *) %o A321129 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 %o A321129 (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 %K A321129 sign,frac,easy %O A321129 1,2 %A A321129 _Peter James Foreman_, Oct 27 2018 %E A321129 More terms from _Vincenzo Librandi_, Oct 28 2018