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.

A257970 a(1) = 1, a(2) = 2, a(3) = 5; thereafter a(n) = 2 * Sum_{k=1..n-1} a(k).

Original entry on oeis.org

1, 2, 5, 16, 48, 144, 432, 1296, 3888, 11664, 34992, 104976, 314928, 944784, 2834352, 8503056, 25509168, 76527504, 229582512, 688747536, 2066242608, 6198727824, 18596183472, 55788550416, 167365651248, 502096953744, 1506290861232, 4518872583696, 13556617751088
Offset: 1

Views

Author

Harry Farrar, May 15 2015

Keywords

Programs

  • Magma
    [1,2,5] cat [16*3^(n-4): n in [4..50]]; // Vincenzo Librandi, May 25 2015
  • Mathematica
    CoefficientList[Series[(x + 1) (x - 1)^2/(1 - 3 x), {x, 0, 33}], x] (* Vincenzo Librandi, May 25 2015 *)
    Join[{1,2,5},NestList[3#&,16,30]] (* Harvey P. Dale, Dec 20 2018 *)

Formula

G.f.: -x*(x+1)*(x-1)^2/(3*x-1). [Corrected by Vincenzo Librandi, May 25 2015]
a(n) = 3*a(n-1) for n>=5.
a(n) = 16*3^(n-4) for n>=4.