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 A248155 #19 May 30 2025 18:55:00 %S A248155 1,-2,3,-5,9,-17,33,-65,129,-257,513,-1025,2049,-4097,8193,-16385, %T A248155 32769,-65537,131073,-262145,524289,-1048577,2097153,-4194305,8388609, %U A248155 -16777217,33554433,-67108865,134217729,-268435457,536870913 %N A248155 Expansion of (1 + x - x^2)/((1 + x)*(1 + 2*x)). %C A248155 Alternating row sums of A105810. %C A248155 Riordan triangle ((1 + x - x^2)/(1 + x)^2, x/(1 + x)). %H A248155 G. C. Greubel, <a href="/A248155/b248155.txt">Table of n, a(n) for n = 0..1000</a> %H A248155 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (-3,-2). %F A248155 O.g.f.: (1+x-x^2)/((1+x)*(1+2*x)). %F A248155 a(n) = (3/2)*b(n) + (5/2)*b(n-1), n>=1, a(0) = 1, with b(n) = A225883(n+1). %F A248155 a(n) = (-1)^n*(1 + 2^(n-1)), n>=1, a(0) = 1. %F A248155 E.g.f.: 2*exp(-x)*(cosh(x/2))^2 - 1. - _G. C. Greubel_, May 30 2025 %t A248155 Table[((-1)^n*(2^n+2) - Boole[n==0])/2, {n,0,50}] (* _G. C. Greubel_, May 30 2025 *) %o A248155 (PARI) Vec((1 + x - x^2)/((1 + x)*(1 + 2*x)) + O (x^40)) \\ _Michel Marcus_, Oct 11 2014 %o A248155 (Magma) %o A248155 A248155:= func< n | n eq 0 select 1 else (-1)^n*(2^(n-1) + 1) >; %o A248155 [A248155(n): n in [0..50]]; // _G. C. Greubel_, May 30 2025 %o A248155 (Python) %o A248155 def A248155(n): return ((-1)**n*(2 + 2**n) - int(n==0))//2 %o A248155 print([A248155(n) for n in range(51)]) # _G. C. Greubel_, May 30 2025 %Y A248155 Cf. A094373, A105810. %K A248155 sign,easy %O A248155 0,2 %A A248155 _Wolfdieter Lang_, Oct 04 2014