OFFSET
1,2
COMMENTS
This is essentially a duplicate of A097164. - R. J. Mathar, Jun 08 2008
Partial sums of A084221.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..3000
Index entries for linear recurrences with constant coefficients, signature (1, 4, -4).
FORMULA
a(n) = Sum_{k=1..n} A084221(k).
G.f.: x*(1+3*x)/((1-4*x^2)*(1-x)).
a(n) = (4/3)*(4^(n/2)-1) if n is even, otherwise a(n) = (4/3)*(7*4^((n-3)/2)-1).
a(n) = (4/3)*(4^floor(n/2) + 4^floor((n-1)/2) - 4^floor((n-2)/2) - 1).
a(n) = 4^floor(n/2) + 4^floor((n+1)/2)/3 - 4/3.
a(n) = A132668(a(n+1)) - 1.
a(n) = A132668(a(n-1) + 1) for n > 0.
A132668(a(n)) = a(n-1) + 1 for n > 0.
MAPLE
a[0]:=0:a[1]:=1:for n from 2 to 100 do a[n]:=4*a[n-2]+4 od: seq(a[n], n=1..31); # Zerinvary Lajos, Mar 17 2008
MATHEMATICA
nxt[{n_, a_}]:={n+1, If[OddQ[n], a+3*4^((n+1)/2-1), a+4^(n/2)]}; Transpose[ NestList[ nxt, {1, 1}, 30]][[2]] (* Harvey P. Dale, Mar 31 2013 *)
PROG
(Magma) [4^Floor(n/2)+4^Floor((n+1)/2)/3-4/3: n in [1..40]]; // Vincenzo Librandi, Aug 17 2011
(PARI) vector(40, n, (3*4^floor(n/2) + 4^floor((n+1)/2) - 4)/3) \\ G. C. Greubel, Nov 08 2018
CROSSREFS
See A133629 for general formulas with respect to the recurrence rule parameter p.
KEYWORD
nonn
AUTHOR
Hieronymus Fischer, Sep 19 2007
STATUS
approved