%I #104 Jun 27 2023 11:32:37
%S 0,1,5,15,37,83,177,367,749,1515,3049,6119,12261,24547,49121,98271,
%T 196573,393179,786393,1572823,3145685,6291411,12582865,25165775,
%U 50331597,100663243,201326537,402653127,805306309,1610612675,3221225409,6442450879,12884901821,25769803707
%N a(n) = 3*(2^n-1) - 2*n.
%C Number of words of length n+1 where first element is from {0,1,2}, other elements are from {0,1} and sequence does not decrease (for n=2 there are 3*2^2 sequences, but 000, 100, 110, 111, 200, 210, 211 decrease, so a(2) = 12-7 = 5).
%C Number of subgroups of C_(2^n) X C_(2^n) (see A060724).
%C Starting with 1 = row sums of triangle A054582. - _Gary W. Adamson_, Jun 23 2008
%C Starting with "1" equals the eigensequence of a triangle with integer squares (1, 4, 9, 16, ...) as the left border and the rest 1's. - _Gary W. Adamson_, Jul 24 2010
%C (1 + 2x + 2x^2 + 2x^3 + ...)*(1 + 3x + 7x^2 + 15x^3 + ...) = (1 + 5x + 15x^2 + 37x^3 + ...). - _Gary W. Adamson_, Mar 14 2012
%C The partial sums of A033484. - _J. M. Bergot_, Oct 03 2012
%C Binomial transform is 0, 1, 7, 33, ... (shifted A066810); inverse binomial transform is 0, 1, 3, 3, ... (3 repeated). - _R. J. Mathar_, Oct 05 2012
%C Define a triangle by T(n,0) = n*(n+1) + 1, T(n,n) = n + 1, and T(r,c) = T(r-1,c-1) + T(r-1,c) otherwise; then a(n+1) is the sum of the terms of row n. - _J. M. Bergot_, Mar 30 2013
%C Starting with "1" are also the antidiagonal sums of the array formed by partial sums of integer squares (1, 4, 9, 16, ...). - _Luciano Ancora_, Apr 24 2015
%C Sums of 2 adjacent terms in diagonal k=2 of Eulerian triangle A008292. I.e., T(n,2)+T(n-1,2) for n > 0. Also, 4th NW-SE diagonal of A126277. In other words, a(n) = A000295(n) + A000295(n+1). - _Gregory Gerard Wojnar_, Sep 30 2018
%H Reinhard Zumkeller, <a href="/A050488/b050488.txt">Table of n, a(n) for n = 0..1000</a>
%H Adam Buck, Jennifer Elder, Azia A. Figueroa, Pamela E. Harris, Kimberly Harry, and Anthony Simpson, <a href="https://arxiv.org/abs/2306.13034">Flattened Stirling Permutations</a>, arXiv:2306.13034 [math.CO], 2023. See p. 14.
%H Tamas Lengyel, <a href="https://doi.org/10.1016/j.jnt.2014.09.015">On p-adic properties of the Stirling numbers of the first kind</a>, Journal of Number Theory, 148 (2015) 73-94.
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (4,-5,2).
%F Row sums of A125165: (1, 5, 15, 37, ...). Binomial transform of [1, 4, 6, 6, 6, ...] = [1, 5, 15, 37, ...]. 4th diagonal from the right of A126777 = (1, 5, 15, ...). - _Gary W. Adamson_, Dec 23 2006
%F a(n) = 2*a(n-1) + (2n-1). - _Gary W. Adamson_, Sep 30 2007
%F From _Johannes W. Meijer_, Feb 20 2009: (Start)
%F a(n+1) = A156920(n+1,1).
%F a(n+1) = A156919(n+1,1)/2^n.
%F a(n+1) = A142963(n+2,1)/2.
%F a(n) = 4a(n-1) - 5a(n-2) + 2a(n-3) for n>2 with a(0) = 0, a(1) = 1, a(2) = 5.
%F G.f.: z*(1+z)/((1-z)^2*(1-2*z)).
%F (End)
%F a(n) = 2*n + 2*a(n-1) - 1 (with a(0)=0). - _Vincenzo Librandi_, Aug 06 2010
%F a(n+1) = Sum_{k=0..n} A000079(k) * A005408(n-k), convolution of the powers of 2 with the odd numbers. - _Reinhard Zumkeller_, Mar 08 2012
%F E.g.f.: exp(x)*(3*exp(x) - 2*x - 3). - _Stefano Spezia_, May 15 2023
%p seq(coeff(series(x*(x+1)/((1-x)^2*(1-2*x)),x,n+1), x, n), n = 0 .. 30); # _Muniru A Asiru_, Oct 26 2018
%t Table[3(2^n-1)-2n,{n,0,30}] (* or *) LinearRecurrence[{4,-5,2}, {0,1,5}, 40] (* _Harvey P. Dale_, Apr 09 2018 *)
%o (Haskell)
%o a050488 n = sum $ zipWith (*) a000079_list (reverse $ take n a005408_list)
%o -- _Reinhard Zumkeller_, Jul 24 2015
%o (PARI) a(n)=3*(2^n-1)-2*n \\ _Charles R Greathouse IV_, Sep 24 2015
%o (Magma) [3*(2^n-1) - 2*n: n in [0..30]]; // _G. C. Greubel_, Oct 23 2018
%o (GAP) List([0..30],n->3*(2^n-1)-2*n); # _Muniru A Asiru_, Oct 26 2018
%o (Python) for n in range(0, 30): print(3*(2**n-1) - 2*n, end=', ') # _Stefano Spezia_, Oct 27 2018
%Y A050487(2^m-1).
%Y Equals (1/2) A051667.
%Y Cf. A000079, A000225, A000295, A005408, A008292, A033484, A054852, A060724, A066810, A125165, A126277, A142963, A156919, A156920, A156925.
%K nonn,easy
%O 0,3
%A _James A. Sellers_, Dec 26 1999