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.

Showing 1-3 of 3 results.

A168131 Number of squares and rectangles that are created at the n-th stage in the corner toothpick structure (see A152980, A153006).

Original entry on oeis.org

0, 0, 1, 2, 1, 1, 5, 7, 3, 1, 4, 5, 3, 7, 18, 19, 7, 1, 4, 5, 3, 7, 17, 17, 7, 6, 13, 13, 13, 32, 56, 47, 15, 1, 4, 5, 3, 7, 17, 17, 7, 6, 13, 13, 13, 32, 55, 45, 15, 6, 13, 13, 13, 31, 51, 41, 20, 25, 39, 39, 58, 120, 160, 111, 31, 1, 4, 5, 3, 7, 17, 17, 7, 6, 13, 13, 13, 32, 55, 45, 15, 6
Offset: 0

Views

Author

Omar E. Pol, Jan 18 2010

Keywords

Comments

Essentially the first differences of A170926. - Omar E. Pol, Feb 16 2013

Examples

			If written as a triangle:
0,
0,
1,2,
1,1,5,7,
3,1,4,5,3,7,18,19,
7,1,4,5,3,7,17,17,7,6,13,13,13,32,56,47,
15,1,4,5,3,7,17,17,7,6,13,13,13,32,55,45,15,6,13,13,13,31,51,41,20,...
The rows (omitting the first term) converge to A170929.
		

Crossrefs

Programs

  • Maple
    w := proc(n) option remember; local k,i;
    if (n=0) then RETURN(0)
    elif (n <= 3) then RETURN(n-1)
    else
    k:=floor(log(n)/log(2));
    i:=n-2^k;
    if (i=0) then RETURN(2^(k-1)-1)
    elif (i<2^k-2) then RETURN(2*w(i)+w(i+1));
    elif (i=2^k-2) then RETURN(2*w(i)+w(i+1)+1);
    else RETURN(2*w(i)+w(i+1)+2);
    fi;
    fi;
    end;
    [seq(w(n),n=0..256)];
  • Mathematica
    a[n_] := a[n] = Module[{k, i}, Which[n==0, 0, n <= 3, n-1, True, k = Floor[Log2[n]]; i = n-2^k; Which[i==0, 2^(k-1)-1, i < 2^k-2, 2*a[i]+a[i+1], i==2^k-2, 2*a[i]+a[i+1]+1, True, 2*a[i]+a[i+1]+2]]];
    Table[a[n], {n, 0, 81}] (* Jean-François Alcover, Sep 25 2022, after Maple code *)

Formula

See Maple program for recurrence.

Extensions

Edited and extended by N. J. A. Sloane, Feb 01 2010

A194278 Total number of polygons after n-th stage in the D-toothpick structure of A194270.

Original entry on oeis.org

0, 0, 0, 0, 2, 8, 14, 16, 26, 38, 46, 48, 56, 72, 102
Offset: 0

Views

Author

Omar E. Pol, Aug 26 2011

Keywords

Comments

The structure of the D-toothpick cellular automaton contains at least several tens of different types of polygons. For more information see A194276 and A194277.

Examples

			Consider the structure with toothpicks of length 2 and D-toothpicks of length sqrt(2). After 3 stages the number of polygons in the structure is equal to 0. After 4 stages there are 2 hexagons, each with area = 6, so a(4) = 2. After 5 stages there are new 6 polygons: 2 hexagons, each with area = 8 and also 2 octagons, each with area = 14, so a(5) = 2+6 = 8.
		

Crossrefs

A170940 4^n-2^n-2.

Original entry on oeis.org

0, 10, 54, 238, 990, 4030, 16254, 65278, 261630, 1047550, 4192254, 16773118, 67100670, 268419070, 1073709054, 4294901758, 17179738110, 68719214590, 274877382654, 1099510579198, 4398044413950, 17592181850110, 70368735789054, 281474959933438, 1125899873288190
Offset: 1

Views

Author

N. J. A. Sloane, Feb 13 2010

Keywords

Comments

a(n) is also the number whose binary representation is the concatenation of n-1 1's, 0, n-1 1's and 0 (See example). [From Omar E. Pol, Mar 16 2010]

Examples

			Contribution from _Omar E. Pol_, Mar 16 2010: (Start)
n ...... a(n) written in base 2 ..... a(n)
1 ................ 0 ................ 0
2 ............... 1010 .............. 10
3 .............. 110110 ............. 54
4 ............. 11101110 ............ 238
5 ............ 1111011110 ........... 990
6 ........... 111110111110 .......... 4030
7 .......... 11111101111110 ......... 16254
8 ......... 1111111011111110 ........ 65278
9 ........ 111111110111111110 ....... 261630
10 ...... 11111111101111111110 ...... 1047550
(End)
		

Crossrefs

Cf. A170926.
Cf. A006516, A138148, A173521. [From Omar E. Pol, Mar 16 2010]

Formula

a(n)= 7*a(n-1) -14*a(n-2) +8*a(n-3) = 2*A129868(n-1). G.f.: 2*x^2*(-5+8*x)/((x-1) * (2*x-1) * (4*x-1)). [From R. J. Mathar, Feb 14 2010]
a(n) = 2*(A006516(n)-1) [From Omar E. Pol, Mar 16 2010]
Showing 1-3 of 3 results.