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 A048654 #87 Jan 05 2025 19:51:35 %S A048654 1,4,9,22,53,128,309,746,1801,4348,10497,25342,61181,147704,356589, %T A048654 860882,2078353,5017588,12113529,29244646,70602821,170450288, %U A048654 411503397,993457082,2398417561,5790292204 %N A048654 a(n) = 2*a(n-1) + a(n-2); a(0)=1, a(1)=4. %C A048654 Generalized Pellian with second term equal to 4. %C A048654 The generalized Pellian with second term equal to s has the terms a(n) = A000129(n)*s + A000129(n-1). The generating function is -(1+s*x-2*x)/(-1+2*x+x^2). - _R. J. Mathar_, Nov 22 2007 %H A048654 T. D. Noe, <a href="/A048654/b048654.txt">Table of n, a(n) for n = 0..300</a> %H A048654 Andreas M. Hinz and Paul K. Stockmeyer, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL25/Hinz/hinz5.html">Precious Metal Sequences and Sierpinski-Type Graphs</a>, J. Integer Seq., Vol 25 (2022), Article 22.4.8. %H A048654 A. F. Horadam, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Scanned/9-3/horadam-a.pdf">Pell Identities</a>, Fib. Quart., Vol. 9, No. 3, 1971, pp. 245-252. %H A048654 A. F. Horadam, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Scanned/3-3/horadam.pdf">Basic Properties of a Certain Generalized Sequence of Numbers</a>, Fibonacci Quarterly, Vol. 3, No. 3, 1965, pp. 161-176. %H A048654 A. F. Horadam, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Scanned/5-5/horadam.pdf">Special properties of the sequence W_n(a,b; p,q)</a>, Fib. Quart., 5.5 (1967), 424-434. %H A048654 Tanya Khovanova, <a href="http://www.tanyakhovanova.com/RecursiveSequences/RecursiveSequences.html">Recursive Sequences</a> %H A048654 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,1). %F A048654 a(n) = ((3+sqrt(2))*(1+sqrt(2))^n - (3-sqrt(2))*(1-sqrt(2))^n)/2*sqrt(2). %F A048654 a(n) = 2*A000129(n+2) - 3*A000129(n+1). - _Creighton Dement_, Oct 27 2004 %F A048654 G.f.: (1+2*x)/(1-2*x-x^2). - _Philippe Deléham_, Nov 03 2008 %F A048654 a(n) = binomial transform of 1, 3, 2, 6, 4, 12, ... . - Al Hakanson (hawkuu(AT)gmail.com), Aug 08 2009 %F A048654 E.g.f.: exp(x)*cosh(sqrt(2)*x) + 3*exp(x)*sinh(sqrt(2)*x)/sqrt(2). - _Vaclav Kotesovec_, Feb 16 2015 %F A048654 a(n) is the denominator of the continued fraction [4, 2, ..., 2, 4] with n-1 2's in the middle. For the numerators, see A221174. - _Greg Dresden_ and _Tongjia Rao_, Sep 02 2021 %F A048654 a(n) = A001333(n) + A000129(n). - _G. C. Greubel_, Aug 09 2022 %t A048654 LinearRecurrence[{2,1},{1,4},30] (* _Harvey P. Dale_, Jul 27 2011 *) %o A048654 (Haskell) %o A048654 a048654 n = a048654_list !! n %o A048654 a048654_list = %o A048654 1 : 4 : zipWith (+) a048654_list (map (* 2) $ tail a048654_list) %o A048654 -- _Reinhard Zumkeller_, Aug 01 2011 %o A048654 (Maxima) %o A048654 a[0]:1$ %o A048654 a[1]:4$ %o A048654 a[n]:=2*a[n-1]+a[n-2]$ %o A048654 A048654(n):=a[n]$ %o A048654 makelist(A048654(n),n,0,30); /* _Martin Ettl_, Nov 03 2012 */ %o A048654 (PARI) a(n)=(([0, 1; 1,2]^n)*[1,4]~)[1] \\ _Charles R Greathouse IV_, May 18 2015 %o A048654 (Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!((1+2*x)/(1-2*x-x^2))); // _G. C. Greubel_, Jul 26 2018 %o A048654 (SageMath) [lucas_number1(n+1,2,-1) +2*lucas_number1(n,2,-1) for n in (0..40)] # _G. C. Greubel_, Aug 09 2022 %Y A048654 Cf. A000129, A001333, A048655, A038761, A084214, A100525. %K A048654 easy,nice,nonn %O A048654 0,2 %A A048654 _Barry E. Williams_