login
A247281
a(n) = 4^n -(-1)^n.
6
0, 5, 15, 65, 255, 1025, 4095, 16385, 65535, 262145, 1048575, 4194305, 16777215, 67108865, 268435455, 1073741825, 4294967295, 17179869185, 68719476735, 274877906945, 1099511627775, 4398046511105, 17592186044415
OFFSET
0,2
FORMULA
a(n) = 5*A015521(n).
a(n+1) = 10*A037481(n) + 5.
a(n+1) = 4*a(n) + 5*(-1)^n.
a(n) = 3*a(n-1) + 4*a(n-2). - Colin Barker, Sep 11 2014
G.f.: -5*x / ((x+1)*(4*x-1)). - Colin Barker, Sep 11 2014
MATHEMATICA
LinearRecurrence[{3, 4}, {0, 5}, 23] (* Jean-François Alcover, May 22 2016 *)
PROG
(PARI) concat(0, Vec(-5*x / ((x+1)*(4*x-1)) + O(x^100))) \\ Colin Barker, Sep 11 2014
(PARI) vector(100, n, 4^(n-1)+(-1)^n) \\ Derek Orr, Sep 11 2014
(Python)
def A247281(n): return (1<<(n<<1))+(1 if n&1 else -1) # Chai Wah Wu, Jun 28 2023
CROSSREFS
KEYWORD
nonn,easy,less
AUTHOR
Paul Curtz, Sep 11 2014
EXTENSIONS
Typos in data fixed by Colin Barker, Sep 11 2014
STATUS
approved