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.

A178789 a(n) = 4^(n-1) + 2: Number of acute angles after n iterations of the Koch snowflake construction.

Original entry on oeis.org

3, 6, 18, 66, 258, 1026, 4098, 16386, 65538, 262146, 1048578, 4194306, 16777218, 67108866, 268435458, 1073741826, 4294967298, 17179869186, 68719476738, 274877906946, 1099511627778, 4398046511106, 17592186044418, 70368744177666
Offset: 1

Views

Author

Keywords

Comments

Starting from an equilateral triangle, at each step each straight segment is replaced by a "/\" shape of four segments of equal length, with the acute angle in the middle pointing to the exterior. The sequence counts the angles which are (i.e., already were) at both extremities, plus the one newly created acute angle in the middle of each former segment. At step n, there are 3*4^(n-1) straight segments, therefore a(n+1) = a(n) + 3*4^(n-1). - M. F. Hasler, Dec 17 2013

Crossrefs

Programs

  • Magma
    [2^(2*(n-1)) + 2: n in [1..30]]; // Vincenzo Librandi, Feb 02 2013
    
  • Maple
    A178789:=n->2+4^(n-1); seq(A178789(n), n=1..30); # Wesley Ivan Hurt, Dec 17 2013
  • Mathematica
    a=b=3;lst={a};Do[a=a+b;b*=4;AppendTo[lst,a],{n,40}];lst
    Flatten[Table[2^(2*(n-1)) + 2, {n, 1, 50}]](* or *)   CoefficientList[Series[(3 - 9*x)/(1 - 5*x + 4*x^2),{x, 0, 100}], x] (* Vincenzo Librandi, Feb 02 2013 *)
  • PARI
    A178789=n->4^(n-1)+2  \\ - M. F. Hasler, Dec 17 2013

Formula

G.f.: 3*x*(1 - 3*x)/(1 - 5*x + 4*x^2).
a(n) = 3 * A047849(n-1).
a(n) = 2^(2*(n-1)) + 2. - Vincenzo Librandi, Feb 02 2013
a(n+1) = a(n) + 3*4^(n-1) = a(n) + A002001(n) for n > 0. - M. F. Hasler, Dec 17 2013
a(n) = 2 + A000302(n-1). - Omar E. Pol, Dec 18 2013