login
a(0) = 0; for n > 0, a(n) = 3*2^(n-1) - 1.
41

%I #71 Sep 14 2024 13:29:26

%S 0,2,5,11,23,47,95,191,383,767,1535,3071,6143,12287,24575,49151,98303,

%T 196607,393215,786431,1572863,3145727,6291455,12582911,25165823,

%U 50331647,100663295,201326591,402653183,805306367,1610612735,3221225471,6442450943,12884901887

%N a(0) = 0; for n > 0, a(n) = 3*2^(n-1) - 1.

%C Apart from leading term (which should really be 3/2), same as A083329.

%C Written in binary, a(n) is 1011111...1.

%C The sequence 2, 5, 11, 23, 47, 95, ... apparently gives values of n such that Nim-factorial(n) = 2. Cf. A059970. However, compare A060152. More work is needed! - _John W. Layman_, Mar 09 2001

%C With offset 1, number of (132,3412)-avoiding two-stack sortable permutations.

%C Number of descents after n+1 iterations of morphism A007413.

%C a(n) = A164874(n,1), n>0; subsequence of A030130. - _Reinhard Zumkeller_, Aug 29 2009

%C Let A be the Hessenberg matrix of order n, defined by: A[1,j]=[i,i]:=1, A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=1, a(n-1)=(-1)^n*charpoly(A,-1). - _Milan Janjic_, Jan 24 2010

%C a(n) is the total number of records over all length n binary words. A record in a word a_1,a_2,...,a_n is a letter a_j that is larger than all the preceding letters. That is, a_j>a_i for all i<j. - _Geoffrey Critzer_, Jul 18 2020

%C Called Thabit numbers after the Syrian mathematician Thābit ibn Qurra (826 or 836 - 901). - _Amiram Eldar_, Jun 08 2021

%H Vincenzo Librandi, <a href="/A055010/b055010.txt">Table of n, a(n) for n = 0..1000</a>

%H Eric S. Egge and Toufik Mansour, <a href="https://arxiv.org/abs/math/0205206">132-avoiding Two-stack Sortable Permutations, Fibonacci Numbers, and Pell Numbers</a>, arXiv:math/0205206 [math.CO], 2002.

%H S. Kitaev and T. Mansour, <a href="https://arxiv.org/abs/math/0210170">Counting the occurrences of generalized patterns in words generated by a morphism</a>, arXiv:math/0210170 [math.CO], 2002.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/ThabitibnKurrahNumber.html">Thabit ibn Kurrah Number</a>.

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Thabit_number">Thabit number</a>.

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (3,-2).

%F a(n) = A118654(n-1, 4), for n > 0.

%F a(n) = 2*a(n-1) + 1 = a(n-1) + A007283(n-1) = A007283(n)-1 = A000079(n) + A000225(n + 1) = A000079(n + 1) + A000225(n) = 3*A000079(n) - 1 = 3*A000225(n) + 2.

%F a(n) = A010036(n)/2^(n-1). - _Philippe Deléham_, Feb 20 2004

%F a(n) = A099258(A033484(n)-1) = floor(A033484(n)/2). - _Reinhard Zumkeller_, Oct 09 2004

%F G.f.: x*(2-x)/((1-x)*(1-2*x)). - _Philippe Deléham_, Oct 04 2011

%F a(n+1) = A196168(A000079(n)). - _Reinhard Zumkeller_, Oct 28 2011

%F E.g.f.: (3*exp(2*x) - 2*exp(x) - 1)/2. - _Stefano Spezia_, Sep 14 2024

%e a(3) = 3*2^2 - 1 = 3*4 - 1 = 11.

%t Join[{0},3*2^Range[0,34]-1] (* _Harvey P. Dale_, May 05 2013 *)

%o (Magma) [Floor(3*2^(n-1) - 1): n in [0..35]]; // _Vincenzo Librandi_, May 18 2011

%o (PARI) a(n)=3*2^n\2 - 1 \\ _Charles R Greathouse IV_, Apr 08 2016

%o (Sage) [0]+[3*2^(n-1)-1 for n in (1..35)] # _G. C. Greubel_, May 06 2019

%o (GAP) Concatenation([0], List([1..35], n-> 3*2^(n-1)-1)) # _G. C. Greubel_, May 06 2019

%Y Cf. A007505 for primes in this sequence. Apart from initial term, same as A052940 and A083329.

%Y Cf. A266550 (independence number of the n-Mycielski graph).

%Y Cf. A000079, A000225, A007283, A007413, A010036, A030130, A033484, A059970, A060152, A099258, A118654, A164874, A196168.

%K easy,nonn

%O 0,2

%A _Henry Bottomley_, May 31 2000