cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A102345 a(n) = 3^n + (-1)^n.

Original entry on oeis.org

2, 2, 10, 26, 82, 242, 730, 2186, 6562, 19682, 59050, 177146, 531442, 1594322, 4782970, 14348906, 43046722, 129140162, 387420490, 1162261466, 3486784402, 10460353202, 31381059610, 94143178826, 282429536482, 847288609442
Offset: 0

Views

Author

Graeme McRae, Feb 16 2005

Keywords

Comments

a(n) = A105723(n) + 2*(-1)^n; (a(n) + A105723(n))/2 = A000244(n). - Reinhard Zumkeller, Apr 18 2005

Crossrefs

Apart from leading term, same as A084182.

Programs

  • Mathematica
    Table[3^n+(-1)^n,{n,0,30}] (* or *) LinearRecurrence[{2,3},{2,2},30] (* Harvey P. Dale, Jun 19 2016 *)
  • Sage
    [lucas_number2(n,2,-3) for n in range(0, 26)] # Zerinvary Lajos, Apr 30 2009

Formula

a(n) = 2*a(n-1) + 3*a(n-2).
From Elmo R. Oliveira, Dec 18 2023: (Start)
G.f.: 2*(1-x)/((1+x)*(1-3*x)).
E.g.f.: exp(-x) + exp(3*x).
a(n) = 2*A046717(n). (End)

A164907 a(n) = (3*3^n-(-1)^n)/2.

Original entry on oeis.org

1, 5, 13, 41, 121, 365, 1093, 3281, 9841, 29525, 88573, 265721, 797161, 2391485, 7174453, 21523361, 64570081, 193710245, 581130733, 1743392201, 5230176601, 15690529805, 47071589413, 141214768241, 423644304721, 1270932914165
Offset: 0

Views

Author

Klaus Brockhaus, Aug 31 2009

Keywords

Comments

Interleaving of A096053 and A083884 without initial term 1.
Partial sums are (essentially) in A080926.
First differences are (essentially) in A105723.
a(n)+a(n+1) = A008776(n+1) = A099856(n+1) = A110593(n+2).
Binomial transform of A056450. Inverse binomial transform of A164908.

Crossrefs

Equals A046717 without initial term 1 and A080925 without initial term 0. Equals A084182 / 2 from second term onward.

Programs

Formula

a(n) = 2*a(n-1)+3*a(n-2) for n > 1; a(0) = 1, a(1) = 5.
G.f.: (1+3*x)/((1+x)*(1-3*x)).
a(n) = 3*a(n-1)+2*(-1)^n. - Carmine Suriano, Mar 21 2014

A084181 2^n+(-2)^n-(-1)^n.

Original entry on oeis.org

1, 1, 7, 1, 31, 1, 127, 1, 511, 1, 2047, 1, 8191, 1, 32767, 1, 131071, 1, 524287, 1, 2097151, 1, 8388607, 1, 33554431, 1, 134217727, 1, 536870911, 1, 2147483647, 1, 8589934591, 1, 34359738367, 1, 137438953471, 1, 549755813887, 1, 2199023255551
Offset: 0

Views

Author

Paul Barry, May 19 2003

Keywords

Comments

Binomial transform is A084182.

Crossrefs

Cf. A083420.

Programs

  • Mathematica
    LinearRecurrence[{-1,4,4},{1,1,7},50] (* or *) Riffle[ LinearRecurrence[ {5,-4},{1,7},30],1] (* Harvey P. Dale, Jan 02 2019 *)

Formula

a(n)=2^n+(-2)^n-(-1)^n;
G.f.: (1+2x+4x^2)/((1+x)(1+2x)(1-2x));
E.g.f.: exp(2x)-exp(-x)+exp(-2x).
Showing 1-3 of 3 results.