%I #14 Jul 14 2015 01:09:26
%S 1,2,4,9,20,43,90,185,376,759,1526,3061,6132,12275,24562,49137,98288,
%T 196591,393198,786413,1572844,3145707,6291434,12582889,25165800,
%U 50331623,100663270,201326565,402653156,805306339,1610612706,3221225441
%N a(0) = 1, a(n) = 3*2^(n-1) - n for n>0.
%C Equals row sums of triangle A179743.
%C Essentially the same as A133095 and A123720. - _R. J. Mathar_, Jul 26 2010
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (4,-5,2).
%F a(0) = 1, a(1) = 2; a(n) = 2*a(n-1) + (n-2) for n>1.
%F G.f. 1-x*(2-4*x+3*x^2) / ( (2*x-1)*(x-1)^2 ). - _R. J. Mathar_, May 03 2013
%e a(5) = 43 = 2*a(4) + 3 = 2*20 + 3
%e a(5) = 43 = sum of row 5 terms, triangle A179743: (1 + 5 + 8 + 12 + 16 + 1).
%t a[0] = 1; a[1] = 2; a[n_] := a[n] = 2 a[n - 1] + (n - 2); Array[a, 35, 0] (* _Robert G. Wilson v_, Aug 03 2010 *)
%o (PARI) a(n)=3*2^n\2-n \\ _Charles R Greathouse IV_, May 03 2013
%Y Cf. A179743.
%K nonn,easy
%O 0,2
%A _Gary W. Adamson_, Jul 25 2010
%E More terms from _Robert G. Wilson v_, Aug 03 2010