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-4 of 4 results.

A170929 When regarded as a triangle, the rows of A168131 converge to this sequence.

Original entry on oeis.org

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, 159, 109, 31, 6, 13, 13, 13, 31, 51, 41, 20, 25, 39, 39, 58, 119, 155, 105, 36, 25, 39, 39, 57, 113, 143, 102, 65, 89, 117, 136, 236, 400, 431, 253, 63, 6, 13, 13, 13, 31
Offset: 0

Views

Author

N. J. A. Sloane, Feb 04 2010

Keywords

Formula

Sum_{i=0 .. 2^k - 1} a(i) = 4^i - 2^i - 2 for k >= 2 (cf. A170940).

A160125 Number of squares and rectangles that are created at the n-th stage in the toothpick structure (see A139250).

Original entry on oeis.org

0, 0, 2, 2, 0, 4, 10, 6, 0, 4, 8, 4, 4, 20, 30, 14, 0, 4, 8, 4, 4, 20, 28, 12, 4, 16, 20, 12, 28, 72, 78, 30, 0, 4, 8, 4, 4, 20, 28, 12, 4, 16, 20, 12, 28, 72, 76, 28, 4, 16, 20, 12, 28, 68, 68, 28, 24, 52, 52, 52, 128, 224, 190, 62, 0, 4, 8, 4, 4, 20, 28, 12, 4, 16, 20, 12, 28, 72
Offset: 1

Views

Author

Omar E. Pol, May 03 2009

Keywords

Crossrefs

First differences of A160124.
Cf. toothpick sequence A139250.

Programs

  • Maple
    # First construct A168131:
    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;
    # Then construct A160125:
    r := proc(n) option remember; local k,i;
    if (n<=2) then RETURN(0)
    elif (n <= 4) then RETURN(2)
    else
    k:=floor(log(n)/log(2)); i:=n-2^k;
    if (i=0) then RETURN(2^k-2)
    elif (i<=2^k-2) then RETURN(4*w(i));
    else RETURN(4*w(i)+2);
    fi; fi; end;
    [seq(r(n),n=0..200)];
    # N. J. A. Sloane, Feb 01 2010
  • Mathematica
    w [n_] := w[n] = Module[{k, i}, Which[n == 0, 0, n <= 3, n - 1, True, k = Floor[Log[2, n]]; i = n - 2^k; Which[i == 0, 2^(k - 1) - 1, i < 2^k - 2, 2 w[i] + w[i + 1], i == 2^k - 2, 2 w[i] + w[i + 1] + 1, True, 2 w[i] + w[i + 1] + 2]]];
    r[n_] := r[n] = Module[{k, i}, Which[n <= 2, 0, n <= 4, 2, True, k = Floor[Log[2, n]]; i = n - 2^k; Which[i == 0, 2^k - 2, i <= 2^k - 2, 4 w[i], True, 4 w[i] + 2]]];
    Array[r, 78] (* Jean-François Alcover, Apr 15 2020, from Maple *)

Formula

See Maple program for recurrence.

Extensions

Terms beyond a(10) from R. J. Mathar, Jan 21 2010

A211008 Triangle read by rows: T(n,k) = number of squares and rectangles of area 2^(k-1) after n-th stage in the toothpick structure of A139250, n>=1, k>=1, assuming the toothpicks have length 2.

Original entry on oeis.org

0, 0, 0, 2, 0, 4, 0, 4, 4, 4, 8, 8, 2, 8, 12, 4, 8, 12, 4, 12, 12, 4, 16, 16, 4, 16, 20, 4, 20, 20, 4, 32, 28, 4, 40, 44, 8, 2, 40, 52, 12, 4, 40, 52, 12, 4, 44, 52, 12, 4, 48, 56, 12, 4, 48, 60, 12, 4, 52, 60, 12, 4, 64, 68, 12, 4, 72, 84, 16, 4
Offset: 1

Views

Author

Omar E. Pol, Sep 18 2012

Keywords

Comments

It appears that the number of rectangles of area 2 in the toothpick structure of A139250 equals the number of hearts in the Q-toothpick cellular automaton of A187210. See conjecture in formula section.

Examples

			For n = 8 in the toothpick structure after 8 stages we have that:
T(8,1) = 8 is the number of squares of size 1 X 1.
T(8,2) = 12 is the number of rectangles of size 1 X 2.
T(8,3) = 4 is the number of squares of size 2 X 2.
Written as an irregular array the sequence begins:
   0;
   0;
   0,  2;
   0,  4;
   0,  4;
   4,  4;
   8,  8,  2;
   8, 12,  4;
   8, 12,  4;
  12, 12,  4;
  16, 16,  4;
  16, 20,  4;
  20, 20,  4;
  32, 28,  4;
  40, 44,  8,  2;
  40, 52, 12,  4;
		

Crossrefs

Zero together with the row sums gives A160124.

Formula

It appears that T(n,2) = A188346(n+2) (checked by hand up to n = 128 in the toothpick structure of A139250).

A170926 Total number of squares and rectangles at the n-th stage in the corner toothpick structure (see A152890, A153006).

Original entry on oeis.org

0, 0, 1, 3, 4, 5, 10, 17, 20, 21, 25, 30, 33, 40, 58, 77, 84, 85, 89, 94, 97, 104, 121, 138, 145, 151, 164, 177, 190, 222, 278, 325, 340, 341, 345, 350, 353, 360, 377, 394, 401, 407, 420, 433, 446, 478, 533, 578, 593, 599, 612, 625, 638, 669, 720, 761, 781, 806, 845, 884, 942
Offset: 0

Views

Author

Omar E. Pol, Jan 18 2010

Keywords

Crossrefs

Partial sums of A168131.

Formula

a(2^k) = (4^k-4)/3 for k >= 2. - N. J. A. Sloane, Feb 13 2010.

Extensions

Edited and extended by N. J. A. Sloane, Feb 01 2010
Showing 1-4 of 4 results.