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

A160124 Total number of squares and rectangles after n stages in the toothpick structure of A139250.

Original entry on oeis.org

0, 0, 0, 2, 4, 4, 8, 18, 24, 24, 28, 36, 40, 44, 64, 94, 108, 108, 112, 120, 124, 128, 148, 176, 188, 192, 208, 228, 240, 268, 340, 418, 448, 448, 452, 460, 464, 468, 488, 516, 528, 532, 548, 568, 580, 608, 680, 756, 784, 788, 804, 824, 836, 864, 932, 1000, 1028
Offset: 0

Views

Author

Omar E. Pol, May 03 2009

Keywords

Comments

From Omar E. Pol, Sep 16 2012: (Start)
It appears that A147614(n)/a(n) converge to 2.
It appears that A139250(n)/a(n) converge to 3/2.
It appears that a(n)/A139252(n) converge to 2.
(End)
Also 0 together with the rows sums of A211008. - Omar E. Pol, Sep 24 2012

Crossrefs

Programs

  • 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]]];
    Join[{0}, Array[r, 100]] // Accumulate (* Jean-François Alcover, Apr 15 2020, after Maple code in A160125 *)

Formula

See A160125 for a recurrence. - N. J. A. Sloane, Feb 03 2010
a(n) = 1+2*A139250(n)-A147614(n), n>0 (Euler's formula). [From R. J. Mathar, Jan 22 2010]
a(n) = A187220(n+1) - A147614(n), n>0. - Omar E. Pol, Feb 15 2013

Extensions

More terms from R. J. Mathar, Jan 21 2010

A159786 Total area of all squares and rectangles after n-th stage in the toothpick structure of A139250, assuming the toothpicks have length 2.

Original entry on oeis.org

0, 0, 0, 4, 8, 8, 12, 32, 48, 48, 52, 64, 72, 76, 104, 176, 224, 224, 228, 240, 248, 252, 280, 336, 368, 372, 392, 424, 444, 480, 608, 864, 960, 960, 964, 976, 984, 988, 1016, 1072, 1104, 1108, 1128, 1160, 1180, 1216, 1344, 1536, 1632, 1636, 1656
Offset: 0

Views

Author

Omar E. Pol, Apr 28 2009

Keywords

Comments

Note that if n > 1 is a power of 2 then a(n) = n^2 - 2n.

Crossrefs

Formula

a(2^k) = A211012(k). - Omar E. Pol, Sep 25 2012

Extensions

More terms from Omar E. Pol, Sep 25 2012

A159789 a(n) = A159786(n+1)/4.

Original entry on oeis.org

0, 0, 1, 2, 2, 3, 8, 12, 12, 13, 16, 18, 19, 26, 44, 56, 56, 57, 60, 62, 63, 70, 84, 92, 93, 98, 106, 111, 120, 152, 216, 240, 240, 241, 244, 246, 247, 254, 268, 276, 277, 282, 290, 295, 304, 336, 384, 408, 409, 414
Offset: 0

Views

Author

Omar E. Pol, Apr 28 2009, May 02 2009

Keywords

Crossrefs

Toothpick sequence: A139250.

Extensions

More terms from Colin Barker, Apr 19 2015

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

A159787 a(n) = A159786(n+1)*3/4.

Original entry on oeis.org

0, 0, 3, 6, 6, 9, 24, 36, 36, 39, 48, 54, 57, 78, 132, 168, 168, 171, 180, 186, 189, 210, 252, 276, 279, 294, 318, 333, 360, 456, 648, 720, 720, 723, 732, 738, 741, 762, 804, 828, 831, 846, 870, 885, 912, 1008, 1152, 1224, 1227, 1242
Offset: 0

Views

Author

Omar E. Pol, Apr 28 2009, May 02 2009

Keywords

Crossrefs

Toothpick sequence: A139250.

Extensions

a(11)-a(49) from Robert Price, May 10 2019

A160126 Total number of squares and rectangles in the toothpick structure after n stages, divided by 2. (See A139250).

Original entry on oeis.org

0, 0, 0, 1, 2, 2, 4, 9, 12, 12, 14, 18, 20, 22, 32, 47, 54, 54, 56, 60, 62, 64, 74, 88, 94, 96, 104, 114, 120, 134, 170, 209, 224, 224, 226, 230, 232, 234, 244, 258, 264, 266, 274, 284, 290, 304, 340, 378, 392, 394, 402, 412, 418, 432, 466, 500, 514
Offset: 0

Views

Author

Omar E. Pol, May 03 2009

Keywords

Crossrefs

Formula

a(n) = A160124(n)/2. - Nathaniel Johnston, Apr 12 2011

Extensions

Terms beyond a(10) from Nathaniel Johnston, Apr 12 2011

A160127 First differences of A160126.

Original entry on oeis.org

0, 0, 1, 1, 0, 2, 5, 3, 0, 2, 4, 2, 2, 10, 15, 7, 0, 2, 4, 2, 2, 10, 14, 6, 2, 8, 10, 6, 14, 36, 39, 15, 0, 2, 4, 2, 2, 10, 14, 6, 2, 8, 10, 6, 14, 36, 38, 14, 2, 8, 10, 6, 14, 34, 34, 14
Offset: 1

Views

Author

Omar E. Pol, May 03 2009

Keywords

Crossrefs

Toothpick sequence: A139250.

Extensions

More terms from Colin Barker, Apr 19 2015
Showing 1-7 of 7 results.