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 A102446 #40 Sep 08 2022 08:45:16 %S A102446 2,2,10,18,58,130,362,882,2330,5858,15178,38610,99322,253762,651050, %T A102446 1666098,4270298,10934690,28015882,71754642,183818170,470836738, %U A102446 1206109418,3089456370,7913894042,20271719522,51927295690,133014173778,340723356538,872780051650 %N A102446 a(n) = a(n-1) + 4*a(n-2) for n>1, a(0) = a(1) = 2. %C A102446 The continued fraction expansion c_0 = 0, c_n = 1/2 (n>0) (see a paper by Bremner & Tzanakis) has convergents 2/1, 2/5, 10/9, 18/29, 58/65, 130/181, ... where the numerators and denominators satisfy the recurrence a_n = a_{n-1} + 4a_{n-2}. The denominators are A006131 and the numerators are the present sequence. %H A102446 Colin Barker, <a href="/A102446/b102446.txt">Table of n, a(n) for n = 0..1000</a> %H A102446 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (1,4). %F A102446 a(n) = 2 * A006131(n). %F A102446 G.f.: Q(0)/x -1/x, where Q(k) = 1 + 4*x^2 + (2*k+3)*x - x*(2*k+1 + 4*x)/Q(k+1); (continued fraction). - _Sergei N. Gladkovskii_, Oct 05 2013 %F A102446 G.f.: -2 / ( -1+x+4*x^2 ). - _R. J. Mathar_, Feb 10 2016 %F A102446 a(n) = (2^(-n)*(-(1-sqrt(17))^(1+n) + (1+sqrt(17))^(1+n)))/sqrt(17). - _Colin Barker_, Dec 22 2016 %t A102446 a[0] = a[1] = 2; a[n_] := a[n] = a[n - 1] + 4a[n - 2]; Table[ a[n], {n, 0, 27}] (* _Robert G. Wilson v_, Feb 23 2005 *) %t A102446 LinearRecurrence[{1, 4}, {2, 2}, 30] (* _Vincenzo Librandi_, Dec 17 2015 *) %o A102446 (Sage) from sage.combinat.sloane_functions import recur_gen2b %o A102446 it = recur_gen2b(2,2,1,4, lambda n: 0) %o A102446 [next(it) for i in range(29)] # _Zerinvary Lajos_, Jul 09 2008 %o A102446 (Sage) %o A102446 def A000129(): %o A102446 x, y = 0, 1 %o A102446 while True: %o A102446 x, y = (x + y) << 1, x - y %o A102446 yield x %o A102446 a = A000129(); [next(a) for i in range(28)] # _Peter Luschny_, Dec 17 2015 %o A102446 (Magma) [n le 2 select 2 else Self(n-1) + 4*Self(n-2): n in [1..30]]; // _Vincenzo Librandi_, Dec 17 2015 %o A102446 (PARI) Vec(-2 / (-1+x+4*x^2) + O(x^40)) \\ _Colin Barker_, Dec 22 2016 %Y A102446 Cf. A006131. %K A102446 nonn,easy %O A102446 0,1 %A A102446 _N. J. A. Sloane_, based on a suggestion from _R. K. Guy_, Feb 23 2005 %E A102446 More terms from _Robert G. Wilson v_, Feb 23 2005