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.

A093356 Number of occurrences of pattern 1-2 after n iterations of morphism A007413.

Original entry on oeis.org

3, 8, 28, 104, 400, 1568, 6208, 24704, 98560, 393728, 1573888, 6293504, 25169920, 100671488, 402669568, 1610645504, 6442516480, 25769934848, 103079477248, 412317384704, 1649268490240, 6597071863808, 26388283260928
Offset: 1

Views

Author

Ralf Stephan, Apr 27 2004

Keywords

Programs

  • Magma
    [Ceiling((3*(4^(n-1)) + 2^n)/2): n in [1..30]]; // Vincenzo Librandi, Oct 03 2011
  • Mathematica
    Join[{3},Table[(3*4^(n-1)+2^n)/2,{n,2,30}]] (* or *) Join[{3}, LinearRecurrence[ {6,-8},{8,28},30]] (* Harvey P. Dale, Oct 02 2011 *)
  • PARI
    a(n)=(3*4^(n-1)+2^n)/2
    

Formula

a(n) = (3*4^(n-1) + 2^n)/2, a(1) = 3.
G.f.: (6 - 20*x + 8*x^2)/((1-2*x)*(1-4*x)).
a(n) = 6*a(n-1) - 8*a(n-2); a(1)=3, a(2)=8, a(3)=28. -Harvey P. Dale, Oct 02 2011