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.

A135399 a(n) = (-1)^n + (-2)^n + 3^n (-1, -2 and 3 are the roots of the equation x^3 = 7*x + 6).

Original entry on oeis.org

3, 0, 14, 18, 98, 210, 794, 2058, 6818, 19170, 60074, 175098, 535538, 1586130, 4799354, 14316138, 43112258, 129009090, 387682634, 1161737178, 3487832978, 10458256050, 31385253914, 94134790218, 282446313698, 847255055010, 2541932937194, 7625463267258
Offset: 0

Views

Author

Miklos Kristof, Dec 11 2007

Keywords

Comments

seq(a(3*n+2)/14, n=0..9) = 1, 15, 487, 12507, 342811, 9214935, 249130927, 6723913587, 181566638371, 4902131463855
seq(a(3*n+1)/98, n=0..9) = 0, 1, 21, 613, 16185, 439921, 11854461, 320257693, 8645459745, 233439396841
seq(a(2*n+1)/6, n=0..14) = 0, 3, 35, 343, 3195, 29183, 264355, 2386023, 21501515, 193622863, 1743042675, 15689131703, 141209175835, 1270910544543, 11438306748995
seq(a(6*n+1)/294, n=0..4) = 0, 7, 5395, 3951487, 2881819915

Examples

			a(3) = (-1)^3 + (-2)^3 + 3^3 = -1 - 8 + 27 = 18.
		

Programs

  • Mathematica
    Table[(-1)^n+(-2)^n+3^n,{n,0,30}] (* or *) LinearRecurrence[{0,7,6},{3,0,14},30] (* Harvey P. Dale, Oct 18 2015 *)
  • PARI
    a(n)=(-1)^n + (-2)^n + 3^n \\ Charles R Greathouse IV, Oct 12 2016

Formula

G.f.: (3 - 7*x^2)/(1-7*x^2-6*x^3).
E.g.f.: exp(-x) + exp(-2*x) + exp(3*x)
a(0)=3, a(1)=0, a(2)=14, a(n) = 7*a(n-2) + 6*a(n-3). - Harvey P. Dale, Oct 18 2015