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 A206776 #38 Feb 18 2024 10:34:48 %S A206776 2,3,13,45,161,573,2041,7269,25889,92205,328393,1169589,4165553, %T A206776 14835837,52838617,188187525,670239809,2387094477,8501763049, %U A206776 30279478101,107841960401,384084837405,1367938433017,4871984973861,17351831787617,61799465310573 %N A206776 a(n) = 3*a(n-1) + 2*a(n-2) for n>1, a(0)=2, a(1)=3. %C A206776 This is the Lucas sequence V(3,-2). %C A206776 Inverse binomial transform of this sequence is A072265. %C A206776 a(n) = A124805(n) - 1 for n>0. %D A206776 Ronald L. Graham, Donald E. Knuth, Oren Patashnik, Concrete Mathematics, 2nd ed., Addison-Wesley, 1994. Exercise 7.49(c), pages 379, 573. %H A206776 Bruno Berselli, <a href="/A206776/b206776.txt">Table of n, a(n) for n = 0..200</a> %H A206776 Wikipedia, <a href="http://en.wikipedia.org/wiki/Lucas_sequence#Specific_names">Lucas sequence: Specific names</a>. %H A206776 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (3,2). %F A206776 G.f.: (2-3*x)/(1-3*x-2*x^2). %F A206776 a(n) = ((3-sqrt(17))^n+(3+sqrt(17))^n)/2^n. %F A206776 a(n) = [x^n] ( (1 + 3*x + sqrt(1 + 6*x + 17*x^2))/2 )^n for n >= 1. - _Peter Bala_, Jun 23 2015 %F A206776 a(n) = (-2)^n * a(-n) for all n in Z. - _Michael Somos_, Oct 13 2016 %F A206776 If c = (3 + sqrt(17))/2, then c^n = (a(n) + sqrt(17)*A007482(n-1)) / 2. - _Michael Somos_, Oct 13 2016 %F A206776 E.g.f.: 2*exp(3*x/2)*cosh(sqrt(17)*x/2). - _Stefano Spezia_, Oct 21 2022 %F A206776 a(n) = 2*A007482(n)-3*A007482(n-1). - _R. J. Mathar_, Feb 18 2024 %e A206776 G.f. = 2 + 3*x + 13*x^2 + 45*x^3 + 161*x^4 + 573*x^5 + 2041*x^6 + 7269*x^7 + ... %p A206776 A206776 := proc(n) %p A206776 option remember ; %p A206776 if n <= 1 then %p A206776 n+2 ; %p A206776 else %p A206776 3*procname(n-1)+2*procname(n-2) ; %p A206776 end if; %p A206776 end proc: %p A206776 seq(A206776(n),n=0..30) ; # _R. J. Mathar_, Feb 18 2024 %t A206776 RecurrenceTable[{a[n] == 3 a[n - 1] + 2 a[n - 2], a[0] == 2, a[1] == 3}, a[n], {n, 25}] %t A206776 LinearRecurrence[{3,2},{2,3},30] (* _Harvey P. Dale_, Apr 29 2014 *) %t A206776 a[ n_] := If[ n < 0, (-2)^n a[ -n], ((3 + Sqrt[17])/2)^n + ((3 - Sqrt[17])/2)^n // Expand]; (* _Michael Somos_, Oct 13 2016 *) %t A206776 a[ n_] := If[ n < 0, (-2)^n a[ -n], Boole[n == 0] + SeriesCoefficient[ ((1 + 3*x + Sqrt[1 + 6*x + 17*x^2])/2)^n, {x, 0, n}]]; (* _Michael Somos_, Oct 13 2016 *) %o A206776 (Magma) [n le 1 select n+2 else 3*Self(n)+2*Self(n-1): n in [0..25]]; %o A206776 (Maxima) a[0]:2$ a[1]:3$ a[n]:=3*a[n-1]+2*a[n-2]$ makelist(a[n], n, 0, 25); %o A206776 (PARI) Vec((2-3*x)/(1-3*x-2*x^2) + O(x^30)) \\ _Michel Marcus_, Jun 26 2015 %o A206776 (PARI) {a(n) = 2 * real(( (3 + quadgen(68)) / 2 )^n)}; /* _Michael Somos_, Oct 13 2016 */ %o A206776 (PARI) {a(n) = my(w = quadgen(-8)); simplify(w^n * subst(2 * polchebyshev(n), x, -3/4*w))}; /* _Michael Somos_, Oct 13 2016 */ %o A206776 (PARI) for(n=0,25,print1(round(((3+sqrt(17))/2)^n+((3-sqrt(17))/2)^n),", ")) \\ _Hugo Pfoertner_, Nov 19 2018 %Y A206776 Cf. A189736 (same recurrence but with initial values reversed). %Y A206776 Cf. A007482, A072265, A124805. %K A206776 nonn,easy %O A206776 0,1 %A A206776 _Bruno Berselli_, Jan 10 2013