login
A127983
Numbers of the form (n - 2/3)*2^(n) - n/2 + 3/4 - (-1)^n/12.
3
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,2
LINKS
W. Bosma, Signed bits and fast exponentiation, J. Th. des Nombres de Bordeaux Vol.13, Fasc. 1, 2001.
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]
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 *)
PROG
(PARI) for(n=1, 50, print1((n-2/3)*2^n -n/2 +3/4 -(-1)^n/12, ", ")) \\ G. C. Greubel, May 08 2018
(Magma) [(n-2/3)*2^n -n/2 +3/4 -(-1)^n/12: n in [1..50]]; // G. C. Greubel, May 08 2018
KEYWORD
nonn
AUTHOR
Artur Jasinski, Feb 09 2007
STATUS
approved