login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


A127980
a(n) = (n + 2/3)*2^(n-1) - 1/2 - (-1)^(n-1)*(1/6).
6
1, 5, 14, 37, 90, 213, 490, 1109, 2474, 5461, 11946, 25941, 55978, 120149, 256682, 546133, 1157802, 2446677, 5155498, 10835285, 22719146, 47535445, 99265194, 206918997, 430615210, 894784853, 1856678570, 3847574869, 7963585194
OFFSET
1,2
LINKS
W. Bosma, Signed bits and fast exponentiation, Journal de Théorie des Nombres de Bordeaux, Vol. 13, Fasc. 1 (2001), p. 38 (Proposition 7).
FORMULA
G.f.: x*(1+x-3*x^2)/((1-x)*(1+x)*(1-2*x)^2). - Colin Barker, Apr 02 2012
E.g.f.: ((1 + 3*x)*cosh(2*x) - 2*sinh(x) + cosh(x)*((2 + 6*x)*sinh(x) - 1))/3. - Stefano Spezia, May 25 2023
MATHEMATICA
Table[(n+2/3)2^(n-1) - 1/2 -(-1)^(n-1)*(1/6), {n, 1, 50}]
LinearRecurrence[{4, -3, -4, 4}, {1, 5, 14, 37}, 50] (* G. C. Greubel, May 08 2018 *)
PROG
(PARI) x='x+O('x^30); Vec(x*(1+x-3*x^2)/((1-x)*(1+x)*(1-2*x)^2)) \\ G. C. Greubel, May 08 2018
(Magma) I:=[1, 5, 14, 37]; [n le 4 select I[n] else 4*Self(n-1)-3*Self(n-2)-4*Self(n-3)+4*Self(n-4): n in [1..30]]; // G. C. Greubel, May 08 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Artur Jasinski, Feb 09 2007
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 22 02:40 EDT 2024. Contains 376090 sequences. (Running on oeis4.)