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 A168642 #18 Oct 10 2024 05:11:08 %S A168642 1,5,11,21,43,85,171,341,683,1365,2731,5461,10923,21845,43691,87381, %T A168642 174763,349525,699051,1398101,2796203,5592405,11184811,22369621, %U A168642 44739243,89478485,178956971,357913941,715827883,1431655765,2863311531 %N A168642 a(n) = (8*2^n + (-1)^n)/3 for n > 0; a(0) = 1. %C A168642 First differences of A085278. %H A168642 Vincenzo Librandi, <a href="/A168642/b168642.txt">Table of n, a(n) for n = 0..200</a> %H A168642 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (1,2). %F A168642 a(n) = A001045(n+3) for n > 0. %F A168642 a(n) = a(n-1) + 2*a(n-2) for n > 2; a(0) = 1, a(1) = 5, a(2) = 11. %F A168642 G.f.: (1 + 2*x)^2/((1+x)*(1-2*x)). %F A168642 E.g.f.: (8*exp(2*x) - 6 + exp(-x))/3. - _G. C. Greubel_, Jul 28 2016 %t A168642 Table[(8*2^n +(-1)^n)/3 - 2*Boole[n==0], {n, 0, 40}] (* or *) LinearRecurrence[{1,2}, {1,5,11}, 40] (* _G. C. Greubel_, Jul 28 2016; Feb 05 2021 *) %o A168642 (Magma) [1] cat [ (8*2^n+(-1)^n)/3: n in [1..30] ]; %o A168642 (PARI) a(n)=([0,1; 2,1]^n*[1;5])[1,1] \\ _Charles R Greathouse IV_, Jul 29 2016 %o A168642 (Sage) [1]+[(2^(n+3) +(-1)^n)/3 for n in (1..40)] # _G. C. Greubel_, Feb 05 2021 %Y A168642 Cf. A001045 (Jacobsthal sequence), A085278 (expansion of (1+2*x)^2/((1-2*x)*(1-x^2))). %K A168642 nonn,easy %O A168642 0,2 %A A168642 _Klaus Brockhaus_, Dec 01 2009