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.

A299913 a(n) = a(n-1) + 2*a(n-2) if n even, or 3*a(n-1) + 4*a(n-2) if n odd, starting with 0, 1.

Original entry on oeis.org

0, 1, 1, 7, 9, 55, 73, 439, 585, 3511, 4681, 28087, 37449, 224695, 299593, 1797559, 2396745, 14380471, 19173961, 115043767, 153391689, 920350135, 1227133513, 7362801079, 9817068105, 58902408631, 78536544841, 471219269047, 628292358729, 3769754152375, 5026338869833
Offset: 0

Views

Author

N. J. A. Sloane, Mar 10 2018

Keywords

References

  • Murat Sahin and Elif Tan, Conditional (strong) divisibility sequences, Fib. Q., 56 (No. 1, 2018), 18-31.

Crossrefs

Bisections give A023001, A083068.

Programs

  • Maple
    a:= n-> (<<0|1|0>, <0|0|1>, <8|8|-1>>^n. <<0, 1, 1>>)[1,1]:
    seq(a(n), n=0..35);  # Alois P. Heinz, Mar 10 2018
  • Mathematica
    Fold[Append[#1, Inner[Times, 2 Boole[OddQ@ #2] + {1, 2}, {#1[[-1]], #1[[-2]]}, Plus]] &, {0, 1}, Range[2, 30]] (* or *)
    CoefficientList[Series[-x (2 x + 1)/((x + 1) (8 x^2 - 1)), {x, 0, 30}], x] (* Michael De Vlieger, Mar 10 2018 *)
    nxt[{n_,a_,b_}]:={n+1,b,If[OddQ[n],b+2a,3b+4a]}; NestList[nxt,{1,0,1},30][[;;,2]] (* Harvey P. Dale, Mar 02 2025 *)
  • PARI
    concat(0, Vec(x*(1 + 2*x) / ((1 + x)*(1 - 8*x^2)) + O(x^40))) \\ Colin Barker, Mar 11 2018

Formula

G.f.: -x*(2*x+1)/((x+1)*(8*x^2-1)). - Alois P. Heinz, Mar 10 2018
From Colin Barker, Mar 11 2018: (Start)
a(n) = (2^(3*n/2) - 1) / 7 for n even.
a(n) = 3*2^((3*(n-1))/2+1)/7 + 1/7 for n odd.
a(n) = -a(n-1) + 8*a(n-2) + 8*a(n-3) for n>2.
(End)

Extensions

More terms from Altug Alkan, Mar 10 2018