%I #56 Sep 08 2022 08:46:03
%S 0,1,5,21,84,329,1274,4900,18767,71687,273371,1041348,3964051,
%T 15083082,57374296,218205281,829778397,3155194917,11996903828,
%U 45614046737,173428037986,659377938380,2506951364015,9531364676687,36237879209259,137774708539300,523812203582283,1991504659990594
%N a(n) = 7*a(n-1) - 14*a(n-2) + 7*a(n-3), a(0)=0, a(1)=1, a(2)=5.
%C The Berndt-type sequence number 2 for argument 2Pi/7 is defined by the following relation: a(n) = -(2^(2n-1)/sqrt(7))*(((s(1))^2n/s(2)) + ((s(4))^2n/s(1)) + ((s(2))^2n/s(4))), where s(j) := sin(2Pi*j/7) - see also sequence A215007. This sequence was motivated by Berndt's et al. papers.
%C We note that a(n) = A002054(n) for n=0,1,...,4, and A002054(5) - a(5) = 1. Moreover, we have a(n+1)=A026027(n) for n=0,...,6, and A026027(7) - a(8) = 1. The characteristic polynomial of a(n) has the form x^3 -7*x^2 +14*x -7 = (x-(2*s(1))^2)*(x-(2*s(2))^2)*(x-(2*s(4))^2) and was known to Johannes Kepler (1571-1630) - see Witula's book and Savio-Suryanarayan's paper.
%D R. Witula, Complex numbers, Polynomials and Fractial Partial Decompositions, T.3, Silesian Technical University Press, Gliwice 2010 (in Polish).
%D R. Witula, E. Hetmaniok and D. Slota, Sums of the powers of any order roots taken from the roots of a given polynomial, Proceedings of the Fifteenth International Conference on Fibonacci Numbers and Their Applications, Eger, Hungary, 2012.
%H G. C. Greubel, <a href="/A215008/b215008.txt">Table of n, a(n) for n = 0..1000</a>
%H B. C. Berndt, A. Zaharescu, <a href="http://dx.doi.org/10.1007/s00208-004-0559-5">Finite trigonometric sums and class numbers</a>, Math. Ann. 330 (2004), 551-575.
%H B. C. Berndt, L.-C. Zhang, <a href="http://dx.doi.org/10.1007/BF01444636">Ramanujan's identities for eta-functions</a>, Math. Ann. 292 (1992), 561-573.
%H Z.-G. Liu, <a href="http://dx.doi.org/10.2140/pjm.2003.209.103">Some Eisenstein series identities related to modular equations of the seventh order</a>, Pacific J. Math. 209 (2003), 103-130.
%H D. Y. Savio and E. R. Suryanarayan, <a href="http://www.jstor.org/stable/2323886">Chebyshev Polynomials and Regular Polygons</a>, Amer. Math. Monthly, 100 (1993), 657-661.
%H Roman Witula, <a href="https://doi.org/10.1515/dema-2013-0418">Ramanujan Type Trigonometric Formulae</a>, Demonstratio Math. 45 (2012) 779-796.
%H R. Wituła, P. Lorenc, M. Różański, M. Szweda, <a href="http://yadda.icm.edu.pl/yadda/element/bwmeta1.element.baztech-142e1ad8-f56c-4c6e-b6e6-f71d1f31e76e">Sums of the rational powers of roots of cubic polynomials</a>, Zeszyty Naukowe Politechniki Slaskiej, Seria: Matematyka Stosowana z. 4, Nr. kol. 1920, 2014.
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (7,-14,7).
%F G.f.: x*(1-2*x)/(1-7*x+14*x^2-7*x^3).
%F a(n+1) - 2*a(n) = (1/sqrt(7))*Sum_{k=0,1,2} cot(2^k * alpha) * (2*sin(2^k * alpha))^(2n), where alpha = 2*Pi/7. - _Roman Witula_, May 16 2014
%F a(n) = A217274(n) - 2*A217274(n-1). - _R. J. Mathar_, Feb 05 2020
%e We have a(6)<a(8), but the following amazing equality holds:
%e ((s(1))^6/s(2)) + ((s(4))^6/s(1)) + ((s(2))^6/s(4))) = ((s(1))^8/s(2)) + ((s(4))^8/s(1)) + ((s(2))^8/s(4))) = -21*sqrt(7)/32.
%e It can be also proved that
%e ((s(1))^3/s(2)) + ((s(4))^3/s(1)) + ((s(2))^3/s(4))) = ((s(1))^5/s(2)) + ((s(4))^5/s(1)) + ((s(2))^5/s(4))) = ((s(1))^7/s(2)) + ((s(4))^7/s(1)) + ((s(2))^7/s(4))).
%p seq(coeff(series(x*(1-2*x)/(1-7*x+14*x^2-7*x^3), x, n+1), x, n), n = 0..30); # _G. C. Greubel_, Oct 03 2019
%t LinearRecurrence[{7,-14,7},{0,1,5},30]
%t CoefficientList[Series[x (1-2x)/(1-7x+14x^2-7x^3),{x,0,30}],x] (* _Harvey P. Dale_, Jul 01 2021 *)
%o (PARI) concat([0], Vec((x-2*x^2)/(1-7*x+14*x^2-7*x^3)+O(x^30))) \\ _Charles R Greathouse IV_, Sep 27 2012
%o (Magma) I:=[0,1,5]; [n le 3 select I[n] else 7*(Self(n-1) -2*Self(n-2) + Self(n-3)): n in [1..30]]; // _G. C. Greubel_, Feb 01 2018
%o (Sage)
%o def A215008_list(prec):
%o P.<x> = PowerSeriesRing(ZZ, prec)
%o return P(x*(1-2*x)/(1-7*x+14*x^2-7*x^3)).list()
%o A215008_list(30) # _G. C. Greubel_, Oct 03 2019
%o (GAP) a:=[0,1,5];; for n in [4..30] do a[n]:=7*(a[n-1]-2*a[n-2]+a[n-3]); od; a; # _G. C. Greubel_, Oct 03 2019
%Y Cf. A215007.
%K nonn,easy
%O 0,3
%A _Roman Witula_, Jul 31 2012