OFFSET
0,3
COMMENTS
Partial sums are A097074.
Pairwise sums are {1, 1, 4, 16, 32, ...} or 2^n -Sum_{k=0..n} binomial(n,k)*(-1)^(n+k)*k.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,2).
FORMULA
a(n) = (2*2^n + 4*(-1)^n)/3 - 0^n.
a(n) = A001045(n+1) + (-1)^n - 0^n.
a(n) = 2*A078008(n) - 0^n.
a(2*n+1) + a(2*n+2) = A000302(n+1). - Paul Curtz, Jun 30 2008
G.f.: 1 - x + x*Q(0), where Q(k) = 1 + 2*x^2 + (4*k+5)*x - x*(4*k+1 + 2*x)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 07 2013
E.g.f.: (1/3)*( 2*exp(2*x) + 4*exp(-x) - 3 ). - G. C. Greubel, Aug 19 2022
MATHEMATICA
k=0; lst={1, k}; Do[k=2^n-k; AppendTo[lst, k], {n, 2, 5!}]; lst (* Vladimir Joseph Stephan Orlovsky, Dec 11 2008 *)
CoefficientList[Series[(1-x+2x^2)/((1+x)(1-2x)), {x, 0, 40}], x] (* Harvey P. Dale, Dec 10 2012 *)
PROG
(Magma) [2*2^n/3+4*(-1)^n/3-0^n: n in [0..35]]; // Vincenzo Librandi, Aug 12 2011
(PARI) a(n)=([0, 1; 2, 1]^n*[1; 0])[1, 1] \\ Charles R Greathouse IV, Oct 03 2016
(SageMath)
def A097073(n): return 1 if (n==0) else 2*(2^n +2*(-1)^n)/3
[A097073(n) for n in (0..40)] # G. C. Greubel, Aug 19 2022
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Jul 22 2004
EXTENSIONS
Obscure variable k in Orlovsky comment replaced with a(n) by R. J. Mathar, Apr 23 2009
STATUS
approved