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

%I #38 Nov 26 2022 02:44:12

%S 3,3,17,66,269,1088,4406,17839,72229,292449,1184102,4794331,19411850,

%T 78596976,318232659,1288497731,5217020805,21123285998,85526438945,

%U 346289481632,1402097486674,5676976825495,22985609904813,93066834503093,376819919954026,1525712707779263

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

%C We call the sequence a(n) the Ramanujan-type sequence number 3 for the argument 2Pi/7 (see A214683 and Witula's papers for details). Since a(n)=as(3n), bs(3n)=cs(3n)=0, where the sequence as(n) and its two conjugate sequences bs(n) and cs(n) are defined in the comments to the sequence A214683 we obtain the following formula a(n) = (c(1)/c(4))^n + (c(2)/c(1))^n + (c(4)/c(2))^n, where c(j) := Cos(2*Pi*j/7). It is interesting that if we set b(n):= (c(1)/c(2))^n + (c(2)/c(4))^n + (c(4)/c(1))^n, for n=0,1,..., and we extend the definition of discussed sequence a(n) to the negative indices by the same formula, i.e.: a(n)=a(n+3)-3*a(n+2)-4*a(n+1), n=-1,-2,..., then we get b(n)=a(-n) for every n=0,1,... (see also example below).

%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="/A215076/b215076.txt">Table of n, a(n) for n = 0..1000</a>

%H Roman Witula, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL12/Witula/witula17.html">Ramanujan Type Trigonometric Formulas: The General Form for the Argument 2*Pi/7</a>, Journal of Integer Sequences, Vol. 12 (2009), Article 09.8.5.

%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 (3,4,1).

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

%F From _Kai Wang_, Jul 08 2020: (Start)

%F a(n) = Sum_{i+2j+3k=n} 3^i*4^j*n*(i+j+k-1)!/(i!*j!*k!).

%F a(n) = (-1)^n*(3*A122600(n) + 6*A122600(n-1) - 4*A122600(n-2)) for n > 1. (End)

%F a(n) = r^n + s^n + t^n where {r,s,t} are the roots of 1+4*x+3*x^2-x^3. - _Joerg Arndt_, Jul 09 2020

%F a(n) = 3*a(n-1) + 4*a(n-2) + a(n-3). - _Wesley Ivan Hurt_, Jul 09 2020

%e We have (c(1)/c(2)) + (c(2)/c(4)) + (c(4)/c(1)) = (a(1)^2 - a(2))/2 = -4, and then (c(1)/c(2))^2 + (c(2)/c(4))^2 + (c(4)/c(1))^2 = 16 - 2*a(1) = 10.

%t LinearRecurrence[{3,4,1},{3,3,17},40]

%o (PARI) Vec((-3+6*x+4*x^2)/(-1+3*x+4*x^2+x^3) + O(x^30)) \\ _Michel Marcus_, Apr 20 2016

%o (PARI) polsym(1+4*x+3*x^2-x^3, 22) \\ _Joerg Arndt_, Jul 09 2020

%o (SageMath)

%o @CachedFunction

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

%o if (n<3): return (3,3,17)[n]

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

%o [a(n) for n in range(40)] # _G. C. Greubel_, Nov 25 2022

%Y Cf. A214683.

%K nonn,easy

%O 0,1

%A _Roman Witula_, Aug 02 2012

%E More terms from _Michel Marcus_, Apr 20 2016