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 A247560 #40 Dec 22 2023 14:17:31 %S A247560 1,1,-1,-7,-17,-23,-1,89,271,457,287,-967,-4049,-8279,-8641,7193, %T A247560 56143,139657,194399,24569,-703889,-2209943,-3814273,-2603047,7447951, %U A247560 32756041,68476319,74404793,-50690897,-449691863,-1146312001,-1640168551,-335257649,5554901257 %N A247560 a(n) = 3*a(n-1) - 4*a(n-2) with a(0) = a(1) = 1. %H A247560 Reinhard Zumkeller, <a href="/A247560/b247560.txt">Table of n, a(n) for n = 0..1000</a> %H A247560 F. Beukers, <a href="http://www.numdam.org/item?id=CM_1980__40_2_251_0">The multiplicity of binary recurrences</a>, Compositio Mathematica, Tome 40 (1980) no. 2, pp. 251-267. See Theorem 2, p. 259. %H A247560 M. Mignotte, <a href="https://pmb.centre-mersenne.org/item/10.5802/pmb.a-58.pdf">Propriétés arithmétiques des suites récurrentes</a>, Besançon, 1988-1989, see p. 14. In French. %H A247560 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (3,-4). %F A247560 G.f.: (1 - 2*x) / (1 - 3*x + 4*x^2). %F A247560 a(n) = 3*a(n-1) - 4*a(n-2) for all n in Z. %F A247560 a(n) = a(-1-n) * 2^(2*n + 1) for all n in Z. %F A247560 a(n) = (-1)^n * A087168(n) for all n in Z. %F A247560 A247565(n) = 2^n + a(n) for all n in Z. %F A247560 a(n) = A247487(2*n + 1) = A247564(2*n + 1) for all n in Z. %e A247560 G.f. = 1 + x - x^2 - 7*x^3 - 17*x^4 - 23*x^5 - x^6 + 89*x^7 + 271*x^8 + ... %p A247560 A247560:=n->simplify((1/14*I)*sqrt(7)*((3/2+(1/2*I)*sqrt(7))^n-(3/2-(1/2*I)*sqrt(7))^n)+1/2*((3/2+(1/2*I)*sqrt(7))^n+(3/2-(1/2*I)*sqrt(7))^n)): seq(A247560(n), n=0..40); # _Wesley Ivan Hurt_, Oct 02 2014 %t A247560 a[ n_] := Re[ (1 - 1/Sqrt[-7]) (3 + Sqrt[-7])^n / 2^n]; %t A247560 LinearRecurrence[{3,-4},{1,1},40] (* _Harvey P. Dale_, Jun 13 2017 *) %o A247560 (PARI) {a(n) = real( (1 + quadgen(-7))^n )}; %o A247560 (Haskell) %o A247560 a247560 n = a247560_list !! n %o A247560 a247560_list = 1 : 1 : zipWith (-) (map (* 3) $ tail a247560_list) %o A247560 (map (* 4) a247560_list) %o A247560 -- _Reinhard Zumkeller_, Sep 20 2014 %o A247560 (Sage) %o A247560 [((1-1/sqrt(-7))*(3+sqrt(-7))^n/2^n).real() for n in range(34)] # _Peter Luschny_, Oct 02 2014 (after Somos) %o A247560 (Magma) I:=[1, 1]; [n le 2 select I[n] else 3*Self(n-1) - 4*Self(n-2): n in [1..30]]; // _G. C. Greubel_, Aug 04 2018 %Y A247560 Cf. A087168, A247487, A247564, A247565. %K A247560 sign,easy %O A247560 0,4 %A A247560 _Michael Somos_, Sep 19 2014