This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A140991 a(n) = (1/9)*(7*2^n + (-1)^n*(3*n+2)) - (n-1)^2. 0

%I

%S 0,1,3,1,5,7,27,61,153,331,719,1489,3069,6223,12579,25285,50753,

%T 101683,203607,407449,815205,1630711,3261803,6523981,13048425,

%U 26097307,52195167,104390881,208782413,417565471,835131699,1670264149

%N a(n) = (1/9)*(7*2^n + (-1)^n*(3*n+2)) - (n-1)^2.

%D R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, Reading, MA, 1990, p. 327.

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

%F a(n) = A006904(n) - (n-1)^2.

%F From _R. J. Mathar_, Mar 27 2009: (Start)

%F a(n) = 3*a(n-1) - 6*a(n-3) + 3*a(n-4) + 3*a(n-5) - 2*a(n-6).

%F G.f.: x*(1-8*x^2+8*x^3+7*x^4)/((-1+2*x)*(1+x)^2*(x-1)^3). (End)

%e a(0) = (1/9)*(7*2^0 + (-1)^0*(3*0+2)) - (0-1)^2 = (1/9)*(7*1 + 1*(0+2)) - (-1)^2 = (1/9)*(7+2) - 1 = 1 - 1 = 0.

%o (MAGMA) [ (1/9)*(7*2^n+(-1)^n*(3*n+2))-(n-1)^2: n in [0..100] ]; // _Vincenzo Librandi_, Dec 19 2010

%Y Cf. A006904.

%K nonn

%O 0,3

%A _Juri-Stepan Gerasimov_, Jul 08 2008

%E Definition corrected by _D. S. McNeil_, Mar 21 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 19 23:31 EDT 2019. Contains 327207 sequences. (Running on oeis4.)