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 A140657 #38 Feb 27 2024 03:05:36 %S A140657 4,-1,7,5,19,29,67,125,259,509,1027,2045,4099,8189,16387,32765,65539, %T A140657 131069,262147,524285,1048579,2097149,4194307,8388605,16777219, %U A140657 33554429,67108867,134217725,268435459,536870909,1073741827,2147483645,4294967299,8589934589 %N A140657 Powers of 2 with 3 alternatingly added and subtracted. %H A140657 Jean-François Alcover and Vincenzo Librandi, <a href="/A140657/b140657.txt">Table of n, a(n) for n = 0..1000</a> (first 101 terms from Jean-François Alcover) %H A140657 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (1, 2). %F A140657 a(2n) = A000079(2n+1) + 3, a(2n+1) = A000079(2n+2) - 3. %F A140657 a(n+1) - 2*a(n) = -9*A033999(n) = (-1)^(n+1)*A010734. %F A140657 a(n) + a(n+1) = 3^*2^n = A007283(n). %F A140657 a(2n) + a(2n+1) = A096045(n) + 2. %F A140657 a(-n) = -A140683(n)/2^n. %F A140657 O.g.f.: (4-5*x)/((1-2*x)(1+x)). - _R. J. Mathar_, Jul 29 2008 %F A140657 a(n) = 2^n+3*(-1)^n. - _R. J. Mathar_ , Jul 29 2008 %t A140657 LinearRecurrence[{1,2},{4,-1},40] (* or *) Total/@Partition[Riffle[ Table[ 2^n, {n,0,40}],{3,-3}],2] (* _Harvey P. Dale_, Nov 13 2014 *) %t A140657 CoefficientList[Series[(4 - 5 x) / ((1 + x) (1 - 2 x)), {x, 0, 50}], x] (* _Vincenzo Librandi_, Jan 14 2015 *) %o A140657 (Magma) [2^n+3*(-1)^n: n in [0..40]]; // _Vincenzo Librandi_, Aug 08 2011 %Y A140657 Cf. A000079, A007283, A010734, A033999, A096045, A140683. %K A140657 sign,easy %O A140657 0,1 %A A140657 _Paul Curtz_, Jul 10 2008 %E A140657 Edited and extended by _R. J. Mathar_, Jul 29 2008 %E A140657 4 inserted as first term and formulas accordingly updated by _Jean-François Alcover_, Jan 14 2015