A127983 a(n) = (n - 2/3)*2^n - n/2 + 3/4 - (-1)^n/12.
1, 5, 18, 52, 137, 339, 808, 1874, 4263, 9553, 21158, 46416, 101029, 218447, 469668, 1004878, 2140835, 4543821, 9611938, 20272460, 42642081, 89478475, 187345568, 391468362, 816491167, 1700091209, 3534400158, 7337235784, 15211342493
Offset: 1
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
- W. Bosma, Signed bits and fast exponentiation, J. Th. des Nombres de Bordeaux Vol.13, Fasc. 1, 2001.
- Index entries for linear recurrences with constant coefficients, signature (5,-7,-1,8,-4).
Programs
-
Magma
[(n-2/3)*2^n -n/2 +3/4 -(-1)^n/12: n in [1..50]]; // G. C. Greubel, May 08 2018
-
Mathematica
Table[(n-2/3)*2^n -n/2 +3/4 -(-1)^n/12, {n, 1, 50}] LinearRecurrence[{5,-7,-1,8,-4}, {1,5,18,52,137}, 50] (* G. C. Greubel, May 08 2018 *)
-
PARI
a(n) = (n-2/3)*2^n -n/2 +3/4 -(-1)^n/12 \\ G. C. Greubel, May 08 2018
Formula
a(n) = (n - 2/3)*2^n - n/2 + 3/4 - (-1)^n/12.
G.f.: x*(1-2*x^3)/(1+x)/((2*x-1)^2*(x-1)^2). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 14 2009 [checked and corrected by R. J. Mathar, Sep 16 2009]