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 A247563 #28 Sep 08 2022 08:46:09 %S A247563 2,3,1,-9,-31,-57,-47,87,449,999,1201,-393,-5983,-16377,-25199,-10089, %T A247563 70529,251943,473713,413367,-654751,-3617721,-8234159,-10231593, %U A247563 2241857,47651943,133988401,211357431,98118689,-551073657,-2045695727,-3932792553,-3615594751 %N A247563 a(n) = 3*a(n-1) - 4*a(n-2) with a(0) = 2, a(1) = 3. %C A247563 This is the Lucas sequence V_n(P, Q) = V_n(3, 4). U_n(P, Q) = U_n(3, 4) = A049072(n). ( a(n)/2 )^2 + 7*( A049072(n-1)/2 )^2 = 4^n. - _Raphie Frank_, Dec 04 2015 %H A247563 Reinhard Zumkeller, <a href="/A247563/b247563.txt">Table of n, a(n) for n = 0..1000</a> %H A247563 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (3,-4). %F A247563 G.f.: (2 - 3*x) / (1 - 3*x + 4*x^2). %F A247563 a(n) = a(-n) * 4^n for all n in Z. %F A247563 a(n) = (-1)^n * A128415(n) if n > 0. %F A247563 a(n) = ((3 + sqrt(-7))/2)^n + ((3 - sqrt(-7))/2)^n. - _Raphie Frank_, Dec 04 2015 %e A247563 G.f. = 2 + 3*x + x^2 - 9*x^3 - 31*x^4 - 57*x^5 - 47*x^6 + 87*x^7 + ... %t A247563 {a[0], a[1]} = {2, 3}; a[n_] := a[n] = 3 a[n - 1] - 4 a[n - 2]; Table[a@ n, {n, 0, 32}] (* _Michael De Vlieger_, Dec 04 2015 *) %t A247563 CoefficientList[Series[(2-3*x)/(1-3*x+4*x^2), {x, 0, 60}], x] (* _G. C. Greubel_, Aug 04 2018 *) %o A247563 (PARI) {a(n) = if( n<0, n=-n; 4^-n, 1) * polcoeff( (2 - 3*x) / (1 - 3*x + 4*x^2) + x * O(x^n), n)}; %o A247563 (Haskell) %o A247563 a247563 n = a247563_list !! n %o A247563 a247563_list = 2 : 3 : zipWith (-) (map (* 3) $ tail a247563_list) %o A247563 (map (* 4) a247563_list) %o A247563 -- _Reinhard Zumkeller_, Sep 20 2014 %o A247563 (Magma) [n le 2 select n+1 else 3*Self(n-1)-4*Self(n-2): n in [1..40]]; // _Vincenzo Librandi_, Dec 05 2015 %o A247563 (Magma) m:=25; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((2 - 3*x)/(1-3*x+4*x^2))); // _G. C. Greubel_, Aug 04 2018 %Y A247563 Cf. A128415, A049072. %K A247563 sign,easy %O A247563 0,1 %A A247563 _Michael Somos_, Sep 20 2014