cp's OEIS Frontend

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.

A166920 a(n) = 2^n - (1 + (-1)^n)/2.

This page as a plain text file.
%I A166920 #37 Sep 08 2022 08:45:48
%S A166920 0,2,3,8,15,32,63,128,255,512,1023,2048,4095,8192,16383,32768,65535,
%T A166920 131072,262143,524288,1048575,2097152,4194303,8388608,16777215,
%U A166920 33554432,67108863,134217728,268435455,536870912,1073741823,2147483648,4294967295
%N A166920 a(n) = 2^n - (1 + (-1)^n)/2.
%C A166920 Partial sums of A014551. The inverse binomial transform yields a sequence 0,2,-1,5,-7,17,...: zero followed by a sign alternating A014551.
%C A166920 The table of a(n) plus higher order differences in successive rows shows A131577 on the main diagonal.
%C A166920 a(n) = 2^n when n is odd and 2^n-1 when n is even. - _Wesley Ivan Hurt_, Nov 15 2013
%H A166920 Vincenzo Librandi, <a href="/A166920/b166920.txt">Table of n, a(n) for n = 0..200</a>
%H A166920 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2,1,-2).
%F A166920 G.f.: x*(2-x)/((1-x)*(1-2*x)*(1+x)).
%F A166920 a(n) = 2^n - (1+(-1)^n)/2.
%F A166920 a(2*n) = A024036(n); a(2*n+1) = A004171(n).
%F A166920 a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3).
%F A166920 a(n+1) - 2*a(n) = A168361(n).
%F A166920 a(n) = A000225(n+1) - A051049(n) = A014551(n) - A168361(n).
%F A166920 E.g.f.: exp(2*x) - cosh(x). - _G. C. Greubel_, May 28 2016
%F A166920 a(n) = Sum_{k=1..n+1} Sum_{i=0..n+1} C(n-k,i). - _Wesley Ivan Hurt_, Sep 22 2017
%F A166920 a(n) = 2*A001045(n) + A000975(n-1) for n>0. - _Yuchun Ji_, Aug 30 2018
%p A166920 A166920:=n->2^n-(1+(-1)^n)/2; seq(A166920(n), n=0..50); # _Wesley Ivan Hurt_, Nov 15 2013
%t A166920 LinearRecurrence[{2,1,-2},{0,2,3},40] (* _Harvey P. Dale_, Oct 16 2012 *)
%o A166920 (Magma) [2^n -(1+(-1)^n)/2: n in [0..30]]; // _Vincenzo Librandi_, May 16 2011
%o A166920 (Haskell)
%o A166920 a166920 n = a166920_list !! n
%o A166920 a166920_list = scanl (+) 0 a014551_list
%o A166920 -- _Reinhard Zumkeller_, Jan 02 2013
%o A166920 (PARI) a(n)=2^n-(1+(-1)^n)/2 \\ _Charles R Greathouse IV_, Oct 07 2015
%Y A166920 Cf. A004171, A014551, A024036, A131577, A168361.
%K A166920 nonn,easy
%O A166920 0,2
%A A166920 _Paul Curtz_, Oct 23 2009
%E A166920 Edited and extended by _R. J. Mathar_, Mar 02 2010