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.

Previous Showing 11-15 of 15 results.

A061776 Start with a single triangle; at n-th generation add a triangle at each vertex, allowing triangles to overlap; sequence gives number of triangles in n-th generation.

Original entry on oeis.org

1, 3, 6, 12, 18, 30, 42, 66, 90, 138, 186, 282, 378, 570, 762, 1146, 1530, 2298, 3066, 4602, 6138, 9210, 12282, 18426, 24570, 36858, 49146, 73722, 98298, 147450, 196602, 294906, 393210, 589818, 786426, 1179642, 1572858, 2359290, 3145722, 4718586, 6291450
Offset: 0

Views

Author

N. J. A. Sloane, R. K. Guy, Jun 23 2001

Keywords

Comments

Number of 3-colorings of the (n,2)-Turán graph. - Alois P. Heinz, Jun 07 2024

References

  • R. Reed, The Lemming Simulation Problem, Mathematics in School, 3 (#6, Nov. 1974), front cover and pp. 5-6.

Crossrefs

A061777 gives total population of triangles at n-th generation.
Cf. A266972.

Programs

  • Maple
    A061776 := proc(n) if n mod 2 = 0 then 6*(2^(n/2)-1); else 3*(2^((n-1)/2)-1)+3*(2^((n+1)/2)-1); fi; end; # for n >= 1
  • Mathematica
    a[0]=1; a[n_/;EvenQ[n]]:=6*(2^(n/2)-1); a[n_/;OddQ[n]] := 3*(2^((n-1)/2)-1) + 3*(2^((n+1)/2)-1); a /@ Range[0, 37] (* Jean-François Alcover, Apr 22 2011, after Maple program *)
    CoefficientList[Series[(1 + 2 x) (1 + x^2) / ((1 - x) (1 - 2 x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 19 2013 *)
    LinearRecurrence[{1,2,-2},{1,3,6,12},40] (* Harvey P. Dale, Mar 27 2019 *)
  • PARI
    a(n)=([0,1,0; 0,0,1; -2,2,1]^n*[1;3;6])[1,1] \\ Charles R Greathouse IV, Feb 19 2017

Formula

Explicit formula given in Maple line.
a(n) = a(n-1)+2*a(n-2)-2*a(n-3) for n>3. G.f.: (1+2*x)*(1+x^2)/((1-x)*(1-2*x^2)). - Colin Barker, May 08 2012
a(n) = 3*A027383(n-1) for n>0, a(0)=1. - Bruno Berselli, May 08 2012

A247976 Triangle read by rows: T(n,k) generated by m-gon expansions in the case of odd m with "vertex to vertex" version or even m with "vertex to side" version. (See comment for details.)

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 4, 6, 4, 1, 4, 6, 4, 1, 4, 6, 4, 1, 4, 6, 4, 1, 5, 10, 10, 5, 1, 5, 10, 10, 5, 1, 5, 10, 10, 5, 1, 5, 10, 10, 5, 1, 6, 15, 20, 15, 6, 1, 6, 15, 20, 15, 6, 1, 6, 15, 20, 15, 6, 1, 6, 15, 20, 15, 6, 1, 7, 21, 35, 35, 21, 7
Offset: 1

Views

Author

Kival Ngaokrajang, Sep 28 2014

Keywords

Comments

Refer to triangle expansions in A061777 and A101946 (and their companions for m-gons) which are "vertex to vertex" and "vertex to side" versions respectively. The label values at each iteration can be arranged as triangle. Any m-gon can also be arranged as the same triangle with conditions: (i) m is odd and expansion is "vertex to vertex" version or (ii) m is even and expansion is "vertex to side" version. m*Sum_{i=1..k}T(n,k) gives the total label value in n-th iteration. See illustration.

Examples

			Triangle begins:
  1;
  1,  1;
  1,  1,  2;
  1,  2,  1,  2;
  1,  2,  1,  3,  3;
  1,  3,  3,  1,  3,  3;
  1,  3,  3,  1,  4,  6,  4;
  1,  4,  6,  4,  1,  4,  6,  4;
  1,  4,  6,  4,  1,  5, 10, 10,  5;
  1,  5, 10, 10,  5,  1,  5, 10, 10, 5;
  ...
		

Crossrefs

Rows sum: A027383.
Column (start from 1s): c3=A008805, c4=A058187, c5=A000332 repeated, c6=A000389 repeated, c7=A000579 repeated.
Vertex to vertex: A061777, A247618, A247619, A247620.
Vertex to side: A101946, A247903, A247904, A247905.
Cf. A074909.

Programs

  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==1, 1, If[k==n, Floor[(n+1)/2], If[OddQ[n], If[k<=(n+ 1)/2, T[n-1, k], T[n-1, k-1] + T[n-1, k]], If[kG. C. Greubel, Feb 18 2022 *)
  • Sage
    @CachedFunction
    def T(n,k): # A247976
        if (k==1): return 1
        elif (k==n): return (n+1)//2
        elif (n%2==1): return T(n-1,k) if (k <= (n+1)/2) else T(n-1,k-1) + T(n-1,k)
        else: return T(n-1,k-1)+T(n-1,k) if (k < (n+2)/2) else T(n,k-n/2)
    flatten([[T(n,k) for k in (1..n)] for n in (1..15)]) # G. C. Greubel, Feb 18 2022

Formula

T(n, k) = ( T(n-1, k) if k <= (n+1)/2 otherwise T(n-1, k-1) + T(n-1, k) ) for odd n rows, ( T(n-1, k-1) + T(n-1, k) if k < (n+2)/2 otherwise T(n, k - n/2) ) for even n rows, with T(n, 1) = 1 and T(n, n) = floor((n+1)/2). - G. C. Greubel, Feb 18 2022

A253895 Total number of octagons in two variants of an octagon expansion after n iterations: either "side-to-side" or "vertex-to-vertex", respectively.

Original entry on oeis.org

1, 3, 7, 14, 25, 41, 63, 90, 120, 154, 192, 233, 278, 328, 382, 439, 500, 566, 636, 709, 786, 868, 954, 1043, 1136, 1234, 1336, 1441, 1550, 1664, 1782, 1903, 2028, 2158, 2292, 2429, 2570, 2716, 2866, 3019, 3176, 3338, 3504, 3673, 3846, 4024, 4206, 4391, 4580, 4774, 4972
Offset: 1

Views

Author

Kival Ngaokrajang, Jan 17 2015

Keywords

Comments

Inspired by A061777 and A179178 which are "vertex-to-vertex" and "side-to-side" versions of equilateral triangle expansion respectively.
In these octagon expansions there is allowed an expansion obeying "two sides separated by one side" or one obeying "two vertices separated by one vertex" for "side-to-side" or "vertex-to-vertex" versions respectively.
Two star shaped hexadecagons (16-gons) and a 4-star appear for n = 8 in the "side-to-side" version, and in the "vertex-to-vertex" version there appear two irregular star shaped icositetragons (24-gons). There are also rare type of polygons appearing for n > 8. See illustrations.

Crossrefs

Cf. A253896, A061777 (Triangle expansion, vertex-to-vertex, 3 vertices), A179178 (Triangle expansion, side-to-side, 2 sides), A253687 (Pentagon expansion, side-to-side, 2 consecutive sides and 1 isolated side), A253688 (Pentagon expansion, vertex-to-vertex, 2 consecutive vertices and 1 isolated vertex), A253547 (Hexagon expansion, vertex-to-vertex, 2 vertices separated by 1 vertex).

Programs

  • PARI
    {
    a=1;d1=0;p=a;print1(a,", ");\\8s2a, total oct.
    for(n=2,100,
       if(n<=7,d1=n-1,
         if(n<9,d1=5,
           if(n<10,d1=3,
             if(n<11,d1=4,
               if(Mod(n,4)==0,d1=3,
                 if(Mod(n,4)==1,d1=4,
                   if(Mod(n,4)==2,d1=5,d1=4
                   )
                 )
               )
             )
           )
         )
       );
       a=a+d1;p=p+a;
       print1(p,", ")
    )
    }

Formula

Conjectures from Colin Barker, Jan 17 2015: (Start)
a(n) = (-4-i*(-i)^n+i*i^n-18*n+8*n^2)/4 for n>8, where i=sqrt(-1).
G.f.: -x*(x^12-2*x^10-x^8+2*x^6+2*x^5+2*x^4+x^3+2*x^2+1) / ((x-1)^3*(x^2+1)).
(End)

A253896 Total number of either concave decagons or concave hexadecagons in two variants of an octagon expansion after n iterations: either "side-to-side" or "vertex-to-vertex", respectively.

Original entry on oeis.org

0, 0, 0, 1, 3, 7, 13, 22, 34, 48, 62, 81, 99, 121, 143, 170, 196, 226, 256, 291, 325, 363, 401, 444, 486, 532, 578, 629, 679, 733, 787, 846, 904, 966, 1028, 1095, 1161, 1231, 1301, 1376, 1450, 1528, 1606, 1689, 1771, 1857, 1943, 2034, 2124, 2218, 2312, 2411, 2509, 2611
Offset: 1

Views

Author

Kival Ngaokrajang, Jan 17 2015

Keywords

Comments

Inspired by A061777 and A179178 which are "vertex-to-vertex" and "side-to-side" versions of equilateral triangle expansion, respectively.
In these octagon expansions, there is allowed only an expansion obeying "two sides separated by one side" or one by obeying "two vertices separated by one vertex" for the "side-to-side" or "vertex-to-vertex" versions, respectively.
Two star-shaped hexadecagons (16-gons) and a 4-star appear when n = 8 for the "side-to-side" version, and in the "vertex-to-vertex" version there appears an irregular star-shaped icositetragons (24-gons). Rare type of polygons also appear for n > 8. See illustrations.

Crossrefs

Cf. A253895, A061777 (Triangle expansion, vertex-to-vertex, 3 vertices), A179178 (Triangle expansion, side-to-side, 2 sides), A253687 (Pentagon expansion, side-to-side, 2 consecutive sides and 1 isolated side), A253688 (Pentagon expansion, vertex-to-vertex, 2 consecutive vertices and 1 isolated vertex), A253547 (Hexagon expansion, vertex-to-vertex, 2 vertices separated by 1 vertex).

Programs

  • PARI
    {
    a=0;d1=0;p=1;print1("0, 0, 0, ",p,", ");\\8s2a1
    for(n=2,100,
       if(n<5,d1=2,
         if(n<7,d1=3,
           if(n<8,d1=2,
             if(Mod(n,4)==0,d1=0,
               if(Mod(n,4)==1,d1=5,
                 if(Mod(n,4)==2,d1=-1,d1=4
                 )
               )
             )
           )
         )
       );
       a=a+d1;p=p+a;
       print1(p,", ")
    )
    }

Formula

Empirical g.f.: -x^4*(2*x^10 -4*x^9 +2*x^8 -2*x^7 +2*x^5 +2*x^4 +2*x^3 +2*x^2 +x +1) / ((x -1)^3*(x +1)*(x^2 +1)). - Colin Barker, Jan 17 2015

A254835 Total number of nonagons in a variant of a nonagon expansion ("side-to-side", two consecutive sides) after n iterations.

Original entry on oeis.org

2, 4, 7, 11, 16, 22, 29, 37, 46, 56, 67, 79, 92, 106, 121, 133, 136, 144, 153, 161, 170, 180, 187, 197, 206, 216, 225, 233, 242, 248, 259, 269, 278, 286, 295, 305, 314, 322, 331, 341, 350, 358, 367, 377, 386, 394, 403, 413, 422, 430, 439, 449, 458, 466, 475, 485, 494, 502
Offset: 1

Views

Author

Kival Ngaokrajang, Feb 08 2015

Keywords

Comments

Two irregular star-shaped 18-gons appear for n = 17.
There are also rare types of polygons appearing for n >= 16. See illustrations.

Crossrefs

Cf. A061777 (Triangle expansion, vertex-to-vertex, 3 vertices), A179178 (Triangle expansion, side-to-side, 2 sides), A253687 (Pentagon expansion, side-to-side, 2 consecutive sides and 1 isolated side), A253688 (Pentagon expansion, vertex-to-vertex, 2 consecutive vertices and 1 isolated vertex), A253547 (Hexagon expansion, vertex-to-vertex, 2 vertices separated by 1 vertex), A253895 and A253896 (Octagon expansion).

Programs

  • PARI
    {a=259;print1("2, 4, 7, 11, 16, 22, 29, 37, 46, 56, 67, 79, 92, 106, 121, 133, 136, 144, 153, 161, 170, 180, 187, 197, 206, 216, 225, 233, 242, 248, ",a,", "); for(n=32,100,if(Mod(n,4)==0,d=10,if(Mod(n,4)==1,d=9,if(Mod(n,4)==2, d=8, d=9)));a=a+d;print1(a,", "))}

Formula

Conjectures from Colin Barker, Feb 08 2015: (Start)
a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-a(n-4) for n>21.
G.f.: -x*(2*x^33 -4*x^32 +4*x^31 -6*x^30 +4*x^29 +2*x^26 -4*x^25 +4*x^24 -4*x^23 +2*x^22 -2*x^20 -4*x^19 +8*x^18 -2*x^17 +8*x^16 +2*x^15 -2*x^14 -2*x^13 -2*x^12 -2*x^11 -2*x^10 -2*x^9 -2*x^8 -2*x^7 -2*x^6 -2*x^5 -2*x^4 -x^3 -3*x^2 -2) / ((x -1)^2*(x^2 +1)).
(End)
Previous Showing 11-15 of 15 results.