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 A115335 #33 Jul 15 2025 08:29:20 %S A115335 3,5,1,9,7,25,39,89,167,345,679,1369,2727,5465,10919,21849,43687, %T A115335 87385,174759,349529,699047,1398105,2796199,5592409,11184807,22369625, %U A115335 44739239,89478489,178956967,357913945,715827879,1431655769,2863311527,5726623065,11453246119 %N A115335 a(0) = 3, a(1) = 5, a(2) = 1, and a(n) = (2^(1 + n) - 11*(-1)^n)/3 for n > 2. %H A115335 G. C. Greubel, <a href="/A115335/b115335.txt">Table of n, a(n) for n = 0..1000</a> %H A115335 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (1,2). %F A115335 a(n) = 2*abs((1/2)*(-1 + (-2)^n) - (2/3)*(2 + (-2)^n)*A057427(n)). %F A115335 From _Colin Barker_, Jan 04 2013: (Start) %F A115335 a(n) = a(n-1) + 2*a(n-2) for n > 4. %F A115335 G.f.: (4*x^4 + 2*x^3 + 10*x^2 - 2*x - 3) / ((x + 1)*(2*x - 1)). (End) %F A115335 E.g.f.: (18 + 3*x^2 - 11*exp(-x) + 2*exp(2*x))/3. - _Franck Maminirina Ramaharo_, Nov 23 2018 %p A115335 seq(coeff(series((4*x^4+2*x^3+10*x^2-2*x-3)/((x+1)*(2*x-1)),x,n+1), x, n), n = 0 .. 35); # _Muniru A Asiru_, Nov 23 2018 %t A115335 Join[{3,5,1},LinearRecurrence[{1,2},{9,7},40]] (* _Harvey P. Dale_, Jul 17 2014 *) %o A115335 (Maxima) append([3, 5, 1], makelist((2^(1 + n) - 11*(-1)^n)/3, n, 3, 40)); /* _Franck Maminirina Ramaharo_, Nov 23 2018 */ %o A115335 (PARI) my(x='x+O('x^50)); Vec((4*x^4+2*x^3+10*x^2-2*x-3)/((x+1)*(2*x-1))) \\ _G. C. Greubel_, Nov 23 2018 %o A115335 (Magma) I:=[9,7]; [3,5,1] cat [n le 2 select I[n] else Self(n-1) + 2*Self(n-2): n in [1..45]]; // _G. C. Greubel_, Nov 23 2018 %o A115335 (Sage) s=((4*x^4+2*x^3+10*x^2-2*x-3)/((x+1)*(2*x-1))).series(x,50); s.coefficients(x, sparse=False) # _G. C. Greubel_, Nov 23 2018 %o A115335 (GAP) a:=[3,5,1];; for n in [4..35] do a[n]:=(2^n-11*(-1)^(n-1))/3; od; a; # _Muniru A Asiru_, Nov 23 2018 %Y A115335 Cf. A115113, A115164, A163868 (bisection). %K A115335 nonn,easy %O A115335 0,1 %A A115335 _Roger L. Bagula_, Mar 06 2006 %E A115335 a(24) corrected, new name, and editing by _Colin Barker_ and _Joerg Arndt_, Jan 04 2013