login
a(n) = 3*a(n-2) - a(n-3) with a(0)=0, a(1)=3, a(2)=0.
19

%I #53 Jan 10 2024 04:58:48

%S 0,3,0,9,-3,27,-18,84,-81,270,-327,891,-1251,3000,-4644,10251,-16932,

%T 35397,-61047,123123,-218538,430416,-778737,1509786,-2766627,5308095,

%U -9809667,18690912,-34737096,65882403,-122902200,232384305,-434589003,820055115,-1536151314

%N a(n) = 3*a(n-2) - a(n-3) with a(0)=0, a(1)=3, a(2)=0.

%C All a(n) are divisible by 3.

%C The Ramanujan-type sequence number 1 for the argument 2*Pi/9 defined by the following identity:

%C 3^(1/3)*a(n) = (c(1)/c(2))^(1/3)*c(1)^n + (c(2)/c(4))^(1/3)*c(2)^n + (c(4)/c(1))^(1/3)*c(4)^n = -( (c(1)/c(2))^(1/3)*c(2)^(n+1) + (c(2)/c(4))^(1/3)*c(4)^(n+1) + (c(4)/c(1))^(1/3)*c(1)^(n+1) ), where c(j) := 2*cos(2*Pi*j/9).

%C The definitions of other Ramanujan-type sequences, for the argument of 2*Pi/9 in one's, are given in the Crossrefs section.

%D R. Witula, E. Hetmaniok, 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="/A214699/b214699.txt">Table of n, a(n) for n = 0..1000</a>

%H Roman Witula, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL13/Witula/witula30.html">Full Description of Ramanujan Cubic Polynomials</a>, Journal of Integer Sequences, Vol. 13 (2010), Article 10.5.7.

%H Roman Witula, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL13/Witula2/witula40r.html">Ramanujan Cubic Polynomials of the Second Kind</a>, Journal of Integer Sequences, Vol. 13 (2010), Article 10.7.5.

%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 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (0,3,-1).

%F G.f.: 3*x/(1 - 3*x^2 + x^3).

%F From _Roman Witula_, Oct 06 2012: (Start)

%F a(n+1) = 3*(-1)^n*A052931(n), which from recurrence relations for a(n) and A052931 can easily be proved inductively.

%F a(n) = -A214779(n+1) - A214779(n). (End)

%e We have a(2) = a(1) + a(4) = a(4) + a(7) + a(8) = -a(3) + a(5) + a(6) = 0, which implies

%e (c(1)/c(2))^(1/3)*c(1)^2 + (c(2)/c(4))^(1/3)*c(2)^2 + (c(4)/c(1))^(1/3)*c(4)^2 = (c(1)/c(2))^(1/3)*(c(1) + c(1)^4) + (c(2)/c(4))^(1/3)*(c(2) + c(2)^4) + (c(4)/c(1))^(1/3)*(c(4) + c(4)^4) = (c(1)/c(2))^(1/3)*(c(1)^4 + c(1)^7 + c(1)^8) + (c(2)/c(4))^(1/3)*(c(2)^4 + c(2)^7 + c(2)^8) + (c(4)/c(1))^(1/3)*(c(4)^4 + c(4)^7 + c(4)^8) = 0.

%e Moreover we have 3000*3^(1/3) = (c(1)/c(2))^(1/3)*c(1)^13 + (c(2)/c(4))^(1/3)*c(2)^13 + (c(4)/c(1))^(1/3)*c(4)^13. - _Roman Witula_, Oct 06 2012

%t LinearRecurrence[{0,3,-1}, {0,3,0}, 30]

%t CoefficientList[Series[3*x/(1 - 3*x^2 + x^3),{x,0,34}],x] (* _James C. McMahon_, Jan 09 2024 *)

%o (Magma) [n le 3 select 3*(1+(-1)^n)/2 else 3*Self(n-2) - Self(n-3): n in [1..40]]; // _G. C. Greubel_, Jan 08 2024

%o (SageMath)

%o def a(n): # a=A214699

%o if (n<3): return 3*(n%2)

%o else: return 3*a(n-2) - a(n-3)

%o [a(n) for n in range(41)] # _G. C. Greubel_, Jan 08 2024

%Y Cf. A006053, A052931, A214683, A214778, A214779.

%Y Cf. A214951, A214954, A217053, A217052, A217069.

%K sign,easy

%O 0,2

%A _Roman Witula_, Jul 26 2012