A299914 a(n) = a(n-1) + 3*a(n-2) if n even, or 2*a(n-1) + 4*a(n-2) if n odd, starting with 0, 1.
0, 1, 1, 6, 9, 42, 69, 306, 513, 2250, 3789, 16578, 27945, 122202, 206037, 900882, 1518993, 6641514, 11198493, 48963042, 82558521, 360969210, 608644773, 2661166386, 4487100705, 19618866954, 33080169069, 144635805954, 243876313161, 1066295850138, 1797924789621
Offset: 0
References
- Murat Sahin and Elif Tan, Conditional (strong) divisibility sequences, Fib. Q., 56 (No. 1, 2018), 18-31.
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (0,9,0,-12)
Programs
-
Maple
a:= n-> (<<0|1>, <-12|9>>^iquo(n, 2, 'r'). <
>)[1, 1]: seq(a(n), n=0..35); # Alois P. Heinz, Mar 10 2018 -
Mathematica
Fold[Append[#1, Inner[Times, Boole[OddQ@ #2] + {1, 3}, {#1[[-1]], #1[[-2]]}, Plus]] &, {0, 1}, Range[2, 30]] (* or *) CoefficientList[Series[-x (3 x^2 - x - 1)/(12 x^4 - 9 x^2 + 1), {x, 0, 30}], x] (* Michael De Vlieger, Mar 10 2018 *)
-
PARI
concat(0, Vec(x*(1 + x - 3*x^2) / (1 - 9*x^2 + 12*x^4) + O(x^30))) \\ Colin Barker, Mar 11 2018
Formula
G.f.: -x*(3*x^2-x-1)/(12*x^4-9*x^2+1). - Alois P. Heinz, Mar 10 2018
a(n) = 9*a(n-2) - 12*a(n-4) for n>3. - Colin Barker, Mar 11 2018
Extensions
More terms from Altug Alkan, Mar 10 2018