login
A127982
Numbers of the form (n - 1/3)2^(n) - n/2 + 1/4 + (-1)^n/12.
4
1, 6, 20, 57, 147, 360, 850, 1959, 4433, 9894, 21840, 47781, 103759, 223908, 480590, 1026723, 2184525, 4631202, 9786700, 20621985, 43341131, 90876576, 190141770, 397060767, 827675977, 1722460830, 3579139400, 7426714269, 15390299463
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 - 1/3)2^(n) - n/2 + 1/4 + (-1)^n/12.
G.f.: -x*(3*x^2-x-1)/((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-1/3)*2^n -n/2 +1/4 +(-1)^n/12, {n, 1, 50}]
LinearRecurrence[{5, -7, -1, 8, -4}, {1, 6, 20, 57, 147}, 50] (* G. C. Greubel, May 08 2018 *)
PROG
(PARI) for(n=1, 50, print1((n-1/3)*2^n -n/2 +1/4 +(-1)^n/12, ", ")) \\ G. C. Greubel, May 08 2018
(Magma) [(n-1/3)*2^n -n/2 +1/4 +(-1)^n/12: n in [1..50]]; // G. C. Greubel, May 08 2018
KEYWORD
nonn
AUTHOR
Artur Jasinski, Feb 09 2007
STATUS
approved