login
A082383
a(0)=1, a(n)=2^n+n-2*a(n-1).
1
1, 1, 4, 3, 14, 9, 52, 31, 202, 117, 800, 459, 3190, 1825, 12748, 7287, 50978, 29133, 203896, 116515, 815566, 466041, 3262244, 1864143, 13048954, 7456549, 52195792, 29826171, 208783142, 119304657, 835132540, 477218599, 3340530130, 1908874365
OFFSET
0,3
FORMULA
a(2n) = (1/9)*(7*4^n+6*n+2); a(2n+1) = (1/9)*(4*4^n+6*n+5).
a(n) = 2*a(n-1)+3*a(n-2)-8*a(n-3)+4*a(n-4). G.f.: (x^2+x-1) / ((x-1)^2*(2*x-1)*(2*x+1)). - Colin Barker, Jun 26 2013
MATHEMATICA
RecurrenceTable[{a[0]==1, a[n]==2^n+n-2a[n-1]}, a, {n, 40}] (* or *) LinearRecurrence[{2, 3, -8, 4}, {1, 1, 4, 3}, 40] (* Harvey P. Dale, Mar 09 2014 *)
PROG
(PARI) a(n)=if(n<1, 1, 2^n+n-2*a(n-1))
CROSSREFS
Sequence in context: A298057 A140884 A351992 * A216486 A321262 A056478
KEYWORD
nonn,easy
AUTHOR
Benoit Cloitre, Apr 13 2003
STATUS
approved