OFFSET
0,1
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
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,7,6).
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
EXAMPLE
a(3) = (-1)^3 + (-2)^3 + 3^3 = -1 - 8 + 27 = 18.
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 *)
PROG
(PARI) a(n)=(-1)^n + (-2)^n + 3^n \\ Charles R Greathouse IV, Oct 12 2016
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Miklos Kristof, Dec 11 2007
STATUS
approved