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 A097073 #36 Apr 18 2025 22:22:16 %S A097073 1,0,4,4,12,20,44,84,172,340,684,1364,2732,5460,10924,21844,43692, %T A097073 87380,174764,349524,699052,1398100,2796204,5592404,11184812,22369620, %U A097073 44739244,89478484,178956972,357913940,715827884,1431655764,2863311532 %N A097073 Expansion of (1-x+2*x^2)/((1+x)*(1-2*x)). %C A097073 Partial sums are A097074. %C A097073 Pairwise sums are {1, 1, 4, 16, 32, ...} or 2^n -Sum_{k=0..n} binomial(n,k)*(-1)^(n+k)*k. %H A097073 Vincenzo Librandi, <a href="/A097073/b097073.txt">Table of n, a(n) for n = 0..1000</a> %H A097073 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (1,2). %F A097073 a(n) = (2*2^n + 4*(-1)^n)/3 - 0^n. %F A097073 a(n) = A001045(n+1) + (-1)^n - 0^n. %F A097073 a(n) = 2*A078008(n) - 0^n. %F A097073 a(2*n+1) + a(2*n+2) = A000302(n+1). - _Paul Curtz_, Jun 30 2008 %F A097073 G.f.: 1 - x + x*Q(0), where Q(k) = 1 + 2*x^2 + (4*k+5)*x - x*(4*k+1 + 2*x)/Q(k+1); (continued fraction). - _Sergei N. Gladkovskii_, Oct 07 2013 %F A097073 E.g.f.: (1/3)*( 2*exp(2*x) + 4*exp(-x) - 3 ). - _G. C. Greubel_, Aug 19 2022 %t A097073 k=0;lst={1, k};Do[k=2^n-k;AppendTo[lst, k], {n, 2, 5!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Dec 11 2008 *) %t A097073 CoefficientList[Series[(1-x+2x^2)/((1+x)(1-2x)),{x,0,40}],x] (* _Harvey P. Dale_, Dec 10 2012 *) %o A097073 (Magma) [2*2^n/3+4*(-1)^n/3-0^n: n in [0..35]]; // _Vincenzo Librandi_, Aug 12 2011 %o A097073 (PARI) a(n)=([0,1; 2,1]^n*[1;0])[1,1] \\ _Charles R Greathouse IV_, Oct 03 2016 %o A097073 (SageMath) %o A097073 def A097073(n): return 1 if (n==0) else 2*(2^n +2*(-1)^n)/3 %o A097073 [A097073(n) for n in (0..40)] # _G. C. Greubel_, Aug 19 2022 %o A097073 (Python) %o A097073 def A097073(n): return ((1<<n)+(-2 if n&1 else 4))//3<<1 if n else 1 # _Chai Wah Wu_, Apr 18 2025 %Y A097073 Cf. A046055, A097074. %Y A097073 Cf. A001045, A078008 (form a(n)=2^n-a(n-1)). %K A097073 easy,nonn %O A097073 0,3 %A A097073 _Paul Barry_, Jul 22 2004 %E A097073 Obscure variable k in Orlovsky comment replaced with a(n) by _R. J. Mathar_, Apr 23 2009