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 A087940 #24 Dec 27 2020 03:36:18 %S A087940 1,5,9,20,39,80,159,320,639,1280,2559,5120,10239,20480,40959,81920, %T A087940 163839,327680,655359,1310720,2621439,5242880,10485759,20971520, %U A087940 41943039,83886080,167772159,335544320,671088639,1342177280,2684354559,5368709120,10737418239 %N A087940 a(n) = Sum_{k=0..n} binomial(n+(-1)^k, k). %H A087940 Harvey P. Dale, <a href="/A087940/b087940.txt">Table of n, a(n) for n = 1..1000</a> %H A087940 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2,1,-2). %F A087940 For n>1 a(n) = 5*2^(n-2)-(1-(-1)^n)/2. %F A087940 From _Colin Barker_, Jun 26 2013: (Start) %F A087940 For n>4 a(n) = 2*a(n-1)+a(n-2)-2*a(n-3). %F A087940 G.f.: -x*(x^3+2*x^2-3*x-1) / ((x-1)*(x+1)*(2*x-1)). (End) %t A087940 Join[{1},LinearRecurrence[{2,1,-2},{5,9,20},40]] (* _Harvey P. Dale_, Feb 03 2015 *) %o A087940 (PARI) a(n) = sum(k=0,n,binomial(n+(-1)^k,k)); \\ _Michel Marcus_, Dec 06 2013 %Y A087940 Cf. A321643 (first differences). %K A087940 nonn,easy %O A087940 1,2 %A A087940 _Benoit Cloitre_, Oct 27 2003 %E A087940 Two more terms from _Michel Marcus_, Dec 06 2013