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 A245489 #30 Sep 08 2022 08:46:08 %S A245489 1,1,7,19,91,331,1387,5419,21931,87211,349867,1397419,5593771, %T A245489 22366891,89483947,357903019,1431677611,5726579371,22906579627, %U A245489 91625794219,366504225451,1466014804651,5864063412907,23456245263019,93824997829291,375299957762731 %N A245489 a(n) = (1^n + (-2)^n + 4^n)/3. %H A245489 Vincenzo Librandi, <a href="/A245489/b245489.txt">Table of n, a(n) for n = 0..1000</a> %H A245489 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,6,-8). %F A245489 G.f.: (1 - 2*x - 2*x^2) / ((1 - x) * (1 + 2*x) * (1 - 4*x)). %F A245489 0 = 8*a(n) - 6*a(n+1) - 3*a(n+2) + a(n+3) for all n in Z. %F A245489 a(2*n) = A018240(4*n + 3). a(2*n + 1) = A129362(4*n). %F A245489 a(n) = A001045(3*n)/(3*A001045(n)) for n >= 1. - _Peter Bala_, Apr 06 2015 %F A245489 E.g.f.: (exp(x) + exp(4*x) + exp(-2*x))/3. - _G. C. Greubel_, Sep 21 2019 %e A245489 G.f. = 1 + x + 7*x^2 + 19*x^3 + 91*x^4 + 331*x^5 + 1387*x^6 + 5419*x^7 + ... %p A245489 seq((1 +(-2)^n +4^n)/3, n=0..30); # _G. C. Greubel_, Sep 21 2019 %t A245489 CoefficientList[Series[(1-2x-2x^2)/((1-x)(1+2x)(1-4x)), {x, 0, 40}], x] (* _Vincenzo Librandi_, Jul 25 2014 *) %t A245489 LinearRecurrence[{3,6,-8},{1,1,7},30] (* _Harvey P. Dale_, Dec 04 2018 *) %o A245489 (PARI) {a(n) = (1^n + (-2)^n + 4^n) / 3}; %o A245489 (PARI) {a(n) = if( n<0, 4^n, 1) * polcoeff( (1 - 2*x - 2*x^2) / ((1 - x) * (1 + 2*x) * (1 - 4*x)) + x * O(x^abs(n)), abs(n))}; %o A245489 (Magma) [(1^n + (-2)^n + 4^n) / 3 : n in [0..30]]; // _Vincenzo Librandi_, Jul 25 2014 %o A245489 (Sage) [(1 +(-2)^n +4^n)/3 for n in (0..30)] # _G. C. Greubel_, Sep 21 2019 %o A245489 (GAP) List([0..30], n-> (1 +(-2)^n +4^n)/3); # _G. C. Greubel_, Sep 21 2019 %Y A245489 Cf. A001045, A018240, A129362. %K A245489 nonn,easy %O A245489 0,3 %A A245489 _Michael Somos_, Jul 23 2014