%I #117 Sep 08 2022 08:45:10
%S 1,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
%N a(0) = 1; for n > 0, a(n) = 3*2^(n-1) - 1.
%C Apart from leading term (which should really be 3/2), same as A055010.
%C Binomial transform of A040001. Inverse binomial transform of A053156.
%C a(n) = A105728(n+1,2). - _Reinhard Zumkeller_, Apr 18 2005
%C Row sums of triangle A133567. - _Gary W. Adamson_, Sep 16 2007
%C Row sums of triangle A135226. - _Gary W. Adamson_, Nov 23 2007
%C a(n) = number of partitions Pi of [n+1] (in standard increasing form) such that the permutation Flatten[Pi] avoids the patterns 2-1-3 and 3-1-2. Example: a(3)=11 counts all 15 partitions of [4] except 13/24, 13/2/4 which contain a 2-1-3 and 14/23, 14/2/3 which contain a 3-1-2. Here "standard increasing form" means the entries are increasing in each block and the blocks are arranged in increasing order of their first entries. - _David Callan_, Jul 22 2008
%C An elephant sequence, see A175654. For the corner squares four A[5] vectors, with decimal values 42, 138, 162, 168, lead to this sequence. For the central square these vectors lead to the companion sequence A003945. - _Johannes W. Meijer_, Aug 15 2010
%C The binary representation of a(n) has n+1 digits, where all digits are 1's except digit n-1. For example: a(4) = 23 = 10111 (2). - _Omar E. Pol_, Dec 02 2012
%C Row sums of triangle A209561. - _Reinhard Zumkeller_, Dec 26 2012
%C If a Stern's sequence based enumeration system of positive irreducible fractions is considered (for example, A007305/A047679, A162909/A162910, A071766/A229742, A245325/A245326, ...), and if it is organized by blocks or levels (n) with 2^n terms (n >= 0), and the fractions, term by term, are summed at each level n, then the resulting sequence of integers is a(n) + 1/2, apart from leading term (which should be 1/2). - _Yosu Yurramendi_, May 23 2015
%C For n >= 2, A083329(n) in binary representation is a string [101..1], also 10 followed with (n-1) 1's. For n >= 3, A036563(n) in binary representation is a string [1..101], also (n-2) 1's followed with 01. Thus A083329(n) is a reflection of the binary representation of A036563(n+1). Example: A083329(5) = 101111 in binary, A036563(6) = 111101 in binary. - _Ctibor O. Zizka_, Nov 06 2018
%H Reinhard Zumkeller, <a href="/A083329/b083329.txt">Table of n, a(n) for n = 0..1000</a>
%H M. Griffiths, I. Mezo, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL13/Griffiths/griffiths11.html">A generalization of Stirling Numbers of the Second Kind via a special multiset</a>, JIS 13 (2010) #10.2.5.
%H Sergey Kitaev, Jeffrey Remmel, Mark Tiefenbruck, <a href="http://www.emis.de/journals/INTEGERS/papers/p16/p16.Abstract.html">Quadrant Marked Mesh Patterns in 132-Avoiding Permutations II</a>, Electronic Journal of Combinatorial Number Theory, Volume 15 #A16. (<a href="http://arxiv.org/abs/1302.2274">arXiv:1302.2274</a>)
%H Agustín Moreno Cañadas, Hernán Giraldo, Gabriel Bravo Rios, <a href="http://dx.doi.org/10.17654/MS101081631">On the Number of Sections in the Auslander-Reiten Quiver of Algebras of Dynkin Type</a>, Far East Journal of Mathematical Sciences (FJMS), Vol. 101, No. 8 (2017), pp. 1631-1654.
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (3,-2).
%F a(n) = (3*2^n - 2 + 0^n)/2.
%F G.f.: (1-x+x^2)/((1-x)*(1-2*x)).
%F E.g.f.: (3*exp(2*x) - 2*exp(x) + exp(0))/2.
%F a(0) = 1, a(n) = sum of all previous terms + n. - _Amarnath Murthy_, Jun 20 2004
%F a(n) = 3*a(n-1) - 2*a(n-2) for n > 2, a(0)=1, a(1)=2, a(2)=5. - _Philippe Deléham_, Nov 29 2013
%F From _Bob Selcoe_, Apr 25 2014: (Start)
%F a(n) = (...((((((1)+1)*2+1)*2+1)*2+1)*2+1)...), with n+1 1's, n >= 0.
%F a(n) = 2*a(n-1) + 1, n >= 2.
%F a(n) = 2^n + 2^(n-1) - 1, n >= 2. (End)
%F a(n) = A086893(n) + A061547(n+1), n > 0. - _Yosu Yurramendi_, Jan 16 2017
%e a(0) = (3*2^0 - 2 + 0^0)/2 = 2/2 = 1 (use 0^0=1).
%p seq(ceil((2^i+2^(i+1)-2)/2), i=0..31); # _Zerinvary Lajos_, Oct 02 2007
%t a[1] = 2; a[n_] := 2a[n - 1] + 1; Table[ a[n], {n, 31}] (* _Robert G. Wilson v_, May 04 2004 *)
%t Join[{1}, LinearRecurrence[{3, -2}, {2, 5}, 40]] (* _Vincenzo Librandi_, Jan 01 2016 *)
%o (Haskell)
%o a083329 n = a083329_list !! n
%o a083329_list = 1 : iterate ((+ 1) . (* 2)) 2
%o -- _Reinhard Zumkeller_, Dec 26 2012, Feb 22 2012
%o (PARI) a(n)=(3*2^n-2+0^n)/2 \\ _Charles R Greathouse IV_, Sep 24 2015
%o (Magma) [1] cat [3*2^(n-1)-1: n in [1..40]]; // _Vincenzo Librandi_, Jan 01 2016
%Y Essentially the same as A055010 and A052940.
%Y Cf. A000225, A052955, A133567, A135226.
%Y Cf. A007505 (primes).
%Y Cf. A266550 (independence number of the n-Mycielski graph).
%K easy,nonn
%O 0,2
%A _Paul Barry_, Apr 27 2003
%E The generating function corrected by _Martin Griffiths_, Dec 01 2009