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-10 of 14 results. Next

A147562 Number of "ON" cells at n-th stage in the "Ulam-Warburton" two-dimensional cellular automaton.

Original entry on oeis.org

0, 1, 5, 9, 21, 25, 37, 49, 85, 89, 101, 113, 149, 161, 197, 233, 341, 345, 357, 369, 405, 417, 453, 489, 597, 609, 645, 681, 789, 825, 933, 1041, 1365, 1369, 1381, 1393, 1429, 1441, 1477, 1513, 1621, 1633, 1669, 1705, 1813, 1849, 1957, 2065, 2389, 2401, 2437, 2473
Offset: 0

Views

Author

N. J. A. Sloane, based on emails from Franklin T. Adams-Watters, R. J. Mathar and David W. Wilson, Apr 29 2009

Keywords

Comments

Studied by Holladay and Ulam circa 1960. See Fig. 1 and Example 1 of the Ulam reference. - N. J. A. Sloane, Aug 02 2009.
Singmaster calls this the Ulam-Warburton cellular automaton. - N. J. A. Sloane, Aug 05 2009
On the infinite square grid, start with all cells OFF.
Turn a single cell to the ON state.
At each subsequent step, each cell with exactly one neighbor ON is turned ON, and everything that is already ON remains ON.
Here "neighbor" refers to the four adjacent cells in the X and Y directions.
Note that "neighbor" could equally well refer to the four adjacent cells in the diagonal directions, since the graph formed by Z^2 with "one-step rook" adjacencies is isomorphic to Z^2 with "one-step bishop" adjacencies.
Also toothpick sequence starting with a central X-toothpick followed by T-toothpicks (see A160170 and A160172). The sequence gives the number of polytoothpicks in the structure after n-th stage. - Omar E. Pol, Mar 28 2011
It appears that this sequence shares infinitely many terms with both A162795 and A169707, see Formula section and Example section. - Omar E. Pol, Feb 20 2015
It appears that the positive terms are also the odd terms (a bisection) of A151920. - Omar E. Pol, Mar 06 2015
Also, the number of active (ON, black) cells in the n-th stage of growth of two-dimensional cellular automaton defined by Wolfram's "Rule 558" or "Rule 686" based on the 5-celled von Neumann neighborhood. - Robert Price, May 10 2016
From Omar E. Pol, Mar 05 2019: (Start)
a(n) is also the total number of "hidden crosses" after 4*n stages in the toothpick structure of A139250, including the central cross, beginning to count the crosses when their nuclei are totally formed with 4 quadrilaterals.
a(n) is also the total number of "flowers with six petals" after 4*n stages in the toothpick structure of A323650.
Note that the location of the "nuclei of the hidden crosses" and the "flowers with six petals" in both toothpick structures is essentially the same as the location of the "ON" cells in the version "one-step bishop" of this sequence (see the illustration of initial terms, figure 2). (End)
This sequence has almost exactly the same graph as A187220, A162795, A169707 and A160164 which is twice A139250. - Omar E. Pol, Jun 18 2022

Examples

			If we label the generations of cells turned ON by consecutive numbers we get a rosetta cell pattern:
. . . . . . . . . . . . . . . . .
. . . . . . . . 4 . . . . . . . .
. . . . . . . 4 3 4 . . . . . . .
. . . . . . 4 . 2 . 4 . . . . . .
. . . . . 4 3 2 1 2 3 4 . . . . .
. . . . . . 4 . 2 . 4 . . . . . .
. . . . . . . 4 3 4 . . . . . . .
. . . . . . . . 4 . . . . . . . .
. . . . . . . . . . . . . . . . .
In the first generation, only the central "1" is ON, a(1)=1. In the next generation, we turn ON four "2", leading to a(2)=a(1)+4=5. In the third generation, four "3" are turned ON, a(3)=a(2)+4=9. In the fourth generation, each of the four wings allows three 4's to be turned ON, a(4)=a(3)+4*3=21.
From _Omar E. Pol_, Feb 18 2015: (Start)
Also, written as an irregular triangle T(j,k), j>=0, k>=1, in which the row lengths are the terms of A011782:
1;
5;
9,   21;
25,  37, 49, 85;
89, 101,113,149,161,197,233,341;
345,357,369,405,417,453,489,597,609,645,681,789,825,933,1041,1365;
...
The right border gives the positive terms of A002450.
(End)
It appears that T(j,k) = A162795(j,k) = A169707(j,k), if k is a power of 2, for example: it appears that the three mentioned triangles only share the elements from the columns 1, 2, 4, 8, 16, ... - _Omar E. Pol_, Feb 20 2015
		

References

  • S. Ulam, On some mathematical problems connected with patterns of growth of figures, pp. 215-224 of R. E. Bellman, ed., Mathematical Problems in the Biological Sciences, Proc. Sympos. Applied Math., Vol. 14, Amer. Math. Soc., 1962.
  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 928.

Crossrefs

Programs

  • Maple
    Since this is the partial sum sequence of A147582, it is most easily obtained using the Maple code given in A147582.
    # [x,y] coordinates of cells on
    Lse := [[0,0]] ;
    # enclosing rectangle of the cells on (that is, minima and maxima in Lse)
    xmin := 0 ;
    xmax := 0 ;
    ymin := 0 ;
    ymax := 0 ;
    # count neighbors of x,y which are on; return 0 if [x,y] is in L
    cntnei := proc(x,y,L)
    local a,p,xpt,ypt;
    a := 0 ;
    if not [x,y] in L then
    for p in Lse do
    xpt := op(1,p) ;
    ypt := op(2,p) ;
    if ( abs(xpt-x) = 1 and ypt=y ) or ( x=xpt and abs(ypt-y) = 1) then
    a := a+1 ;
    fi;
    od:
    fi:
    RETURN(a) ;
    end:
    # loop over generations/steps
    for stp from 1 to 10 do
    Lnew := [] ;
    for x from xmin-1 to xmax+1 do
    for y from ymin-1 to ymax+1 do
    if cntnei(x,y,Lse) = 1 then
    Lnew := [op(Lnew),[x,y]] ;
    fi;
    od:
    od:
    for p in Lnew do
    xpt := op(1,p) ;
    ypt := op(2,p) ;
    xmin := min(xmin,xpt) ;
    xmax := max(xmax,xpt) ;
    ymin := min(ymin,ypt) ;
    ymax := max(ymax,ypt) ;
    od:
    Lse := [op(Lse),op(Lnew)] ;
    print(nops(Lse)) ;
  • Mathematica
    Join[{0},Map[Function[Apply[Plus,Flatten[ #1]]],CellularAutomaton[{686,{2,{{0,2,0},{2,1,2},{0,2,0}}},{1,1}},{{{1}},0},200]]] (* Nadia Heninger and N. J. A. Sloane, Aug 11 2009; modified by Paolo Xausa, Aug 12 2022 to include the a(0) term *)
    ArrayPlot /@ CellularAutomaton[{686, {2, {{0, 2, 0}, {2, 1, 2}, {0, 2, 0}}}, {1, 1}}, {{{1}}, 0}, 16] (* N. J. A. Sloane, Nov 08 2014 *)
    A147562list[nmax_]:=Accumulate[Join[{0,1},4*3^(DigitCount[Range[nmax-1],2,1]-1)]];A147562list[100] (* Paolo Xausa, May 21 2023 *)
  • PARI
    a(n) = if (n, 1 + 4*sum(k=1, n-1, 3^(hammingweight(k)-1)), 0); \\ Michel Marcus, Jul 05 2022

Formula

a(n) = 1 + 4*Sum_{k=1..n-1} 3^(wt(k)-1) for n>1, where wt() = A000120(). [Corrected by Paolo Xausa, Aug 12 2022]
For asymptotics see the discussion in the comments in A006046. - N. J. A. Sloane, Mar 11 2021
From Omar E. Pol, Mar 13 2011: (Start)
a(n) = 2*A151917(n) - 1, for n >= 1.
a(n) = 1 + 4*A151920(n-2), for n >= 2.
(End)
It appears that a(n) = A162795(n) = A169707(n), if n is a member of A048645, otherwise a(n) < A162795(n) < A169707(n). - Omar E. Pol, Feb 20 2015
It appears that a(n) = A151920(2n-2), n >= 1. - Omar E. Pol, Mar 06 2015
It appears that a(n) = (A130665(2n-1) - 1)/3, n >= 1. - Omar E. Pol, Mar 07 2015
a(n) = 1 + 4*(A130665(n-1) - 1)/3, n >= 1. Omar E. Pol, Mar 07 2015
a(n) = A323650(2n)/3. - Omar E. Pol, Mar 04 2019

Extensions

Offset and initial terms changed by N. J. A. Sloane, Jun 07 2009
Numbers in the comment adapted to the offset by R. J. Mathar, Mar 03 2010

A130665 a(n) = Sum_{k=0..n} 3^wt(k), where wt() = A000120().

Original entry on oeis.org

1, 4, 7, 16, 19, 28, 37, 64, 67, 76, 85, 112, 121, 148, 175, 256, 259, 268, 277, 304, 313, 340, 367, 448, 457, 484, 511, 592, 619, 700, 781, 1024, 1027, 1036, 1045, 1072, 1081, 1108, 1135, 1216, 1225, 1252, 1279, 1360, 1387, 1468, 1549, 1792, 1801, 1828, 1855
Offset: 0

Views

Author

N. J. A. Sloane, based on a message from Don Knuth, Jun 23 2007

Keywords

Comments

Partial sums of A048883. - David Applegate, Jun 11 2009
From Gary W. Adamson, Aug 26 2016: (Start)
The formula of Mar 26 2010 is equivalent to the left-shifted vector of matrix powers (lim_{k->infinity} M^k), of the production matrix M:
1, 0, 0, 0, 0, 0, ...
4, 0, 0, 0, 0, 0, ...
3, 1, 0, 0, 0, 0, ...
0, 4, 0, 0, 0, 0, ...
0, 3, 1, 0, 0, 0, ...
0, 0, 4, 0, 0, 0, ...
0, 0, 3, 1, 0, 0, ...
...
The sequence divided by its aerated variant is (1, 4, 3, 0, 0, 0, ...). (End)

Crossrefs

Programs

  • Haskell
    a130665 = sum . map (3 ^) . (`take` a000120_list) . (+ 1)
    -- Reinhard Zumkeller, Apr 18 2012
    
  • Maple
    u:=3; a[1]:=1; M:=30; for n from 1 to M do a[2*n] := (u+1)*a[n]; a[2*n+1] := u*a[n] + a[n+1]; od; t1:=[seq( a[n], n=1..2*M )]; # Gives sequence with a different offset
  • Mathematica
    f[n_] := Sum[3^Count[ IntegerDigits[k, 2], 1], {k, 0, n}]; Array[f, 51, 0] (* Robert G. Wilson v, Jun 28 2010 *)
  • Python
    def a(n):  # formula version, n=10^10000 takes ~1 second
        if n == 0:
            return 1
        msb = 1 << (n.bit_length() - 1)
        return msb**2 + 3 * a(n-msb) # Stefan Pochmann, Mar 15 2023
    
  • Python
    def a(n):  # optimized, n=10^50000 takes ~1 second
        n += 1
        total = 0
        power3 = 1
        while n:
            log = n.bit_length() - 1
            total += power3 << (2*log)
            n -= 1 << log
            power3 *= 3
        return total # Stefan Pochmann, Mar 15 2023

Formula

With a different offset: a(1) = 1; a(n) = max { 3*a(k)+a(n-k) | 1 <= k <= n/2 }, for n>1.
a(2n+1) = 4*a(n) and a(2n) = 3*a(n-1) + a(n).
a(n) = (A147562(n+1) - 1)*3/4 + 1. - Omar E. Pol, Nov 08 2009
a(n) = A160410(n+1)/4. - Omar E. Pol, Nov 12 2009
Let r(x) = (1 + 4x + 3x^2), then (1 + 4x + 7x^2 + 16x^3 + ...) =
r(x)* r(x^2) * r(x^4) * r(x^8) * ... - Gary W. Adamson, Mar 26 2010
For asymptotics see the discussion in the comments in A006046. - N. J. A. Sloane, Mar 11 2021
a(n) = Sum_{k=0..floor(log_2(n+1))} 3^k * A360189(n,k). - Alois P. Heinz, Mar 06 2023
a(n) = msb^2 + 3*a(n-msb), where msb = A053644(n). - Stefan Pochmann, Mar 15 2023

Extensions

Simpler definition (and new offset) from David Applegate, Jun 11 2009
Lower limit of sum in definition changed from 1 to 0 by Robert G. Wilson v, Jun 28 2010

A160172 T-toothpick sequence (see Comments lines for definition).

Original entry on oeis.org

0, 1, 4, 9, 18, 27, 36, 49, 74, 95, 104, 117, 142, 167, 192, 229, 302, 359, 368, 381, 406, 431, 456, 493, 566, 627, 652, 689, 762, 835, 908, 1017, 1234, 1399, 1408, 1421, 1446, 1471, 1496, 1533, 1606, 1667, 1692, 1729, 1802, 1875, 1948, 2057, 2274, 2443, 2468
Offset: 0

Views

Author

Omar E. Pol, Jun 01 2009

Keywords

Comments

A T-toothpick is formed from three toothpicks of equal length, in the shape of a T. There are three endpoints. We call the middle of the top toothpick the pivot point.
We start at round 0 with no T-toothpicks.
At round 1 we place a T-toothpick anywhere in the plane.
At round 2 we place three other T-toothpicks.
And so on...
The rule for adding a new T-toothpick is the following. A new T-toothpick is added at any exposed endpoint, with the pivot point touching the endpoint and so that the crossbar of the new toothpick is perpendicular to the exposed end.
The sequence gives the number of T-toothpicks after n rounds. A160173 (the first differences) gives the number added at the n-th round.
See the entry A139250 for more information about the toothpick process and the toothpick propagation.
On the infinite square grid a T-toothpick can be represented as a square polyedge with three components from a central point: two consecutive components on the same straight-line and a centered orthogonal component.
If the T-toothpick has three components then at the n-th round the structure is a polyedge with 3*a(n) components.
From Omar E. Pol, Mar 26 2011: (Start)
For formula and more information see the Applegate-Pol-Sloane paper, chapter 11, "T-shaped toothpicks". See also A160173.
Also, this sequence can be illustrated using another structure in which every T-toothpick is replaced by an isosceles right triangle. (End)
The structure is very distinct but the graph is similar to the graphs from the following sequences: A147562, A160164, A162795, A169707, A187220, A255366, A256260, at least for the known terms from Data section. - Omar E. Pol, Nov 24 2015
Shares with A255366 some terms with the same index, for example the element a(43) = 1729, the Hardy-Ramanujan number. - Omar E. Pol, Nov 25 2015

Crossrefs

Programs

Formula

a(n) = 2*A151920(n) + 2*A151920(n-1) + n + 1. - Charlie Neder, Feb 07 2019

Extensions

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

A147610 a(n) = 3^(wt(n-1)-1), where wt() = A000120().

Original entry on oeis.org

1, 1, 3, 1, 3, 3, 9, 1, 3, 3, 9, 3, 9, 9, 27, 1, 3, 3, 9, 3, 9, 9, 27, 3, 9, 9, 27, 9, 27, 27, 81, 1, 3, 3, 9, 3, 9, 9, 27, 3, 9, 9, 27, 9, 27, 27, 81, 3, 9, 9, 27, 9, 27, 27, 81, 9, 27, 27, 81, 27, 81, 81, 243, 1, 3, 3, 9, 3, 9, 9, 27, 3, 9, 9, 27, 9, 27, 27, 81, 3, 9, 9, 27, 9, 27, 27, 81, 9
Offset: 2

Views

Author

N. J. A. Sloane, Apr 29 2009

Keywords

Comments

a(n) = A147582(n)/4.

Examples

			When written as a triangle:
.1,
.1,3,
.1,3,3,9,
.1,3,3,9,3,9,9,27,
.1,3,3,9,3,9,9,27,3,9,9,27,9,27,27,81,
.1,3,3,9,3,9,9,27,3,9,9,27,9,27,27,81,3,9,9,27,9,27,27,81,9,27,27,81,27,81,81,243,
....
Rows converge to A048883. Row sums give A000302. Partial sums give A151920.
		

Crossrefs

Programs

Formula

a(n) = 3^A048881(n-2). - R. J. Mathar, Apr 30 2009
Recurrence: Write n = 2^i + 1 + j, 0 <= j < 2^i. Then a(2^i+1) = 1; for j>0, a(2^i+j+1) = 3*a(j+1). - N. J. A. Sloane, Jun 09 2009
G.f.: x*(Product_{k>=0} (1 + 3*x^(2^k)) - 1)/3. - N. J. A. Sloane, Jun 10 2009

Extensions

Extended by R. J. Mathar, Apr 30 2009
Offset corrected by N. J. A. Sloane, Jun 09 2009
Further edited by N. J. A. Sloane, Aug 06 2009

A255747 Partial sums of A160552.

Original entry on oeis.org

0, 1, 2, 5, 6, 9, 14, 21, 22, 25, 30, 37, 42, 53, 70, 85, 86, 89, 94, 101, 106, 117, 134, 149, 154, 165, 182, 201, 222, 261, 310, 341, 342, 345, 350, 357, 362, 373, 390, 405, 410, 421, 438, 457, 478, 517, 566, 597, 602, 613, 630, 649, 670, 709, 758, 793, 814, 853, 906, 965, 1046, 1173, 1302, 1365, 1366, 1369, 1374
Offset: 0

Views

Author

Omar E. Pol, Mar 05 2015

Keywords

Comments

It appears that the sums of two successive terms give the positive terms of the toothpick sequence A139250.
It appears that the odd terms (a bisection) give A162795.
It appears that a(n) is also the total number of ON cells at stage n+1 in one of the four wedges of two-dimensional cellular automaton "Rule 750" using the von Neumann neighborhood (see A169707). Therefore a(n) is also the total number of ON cells at stage n+1 in one of the four quadrants of the NW-NE-SE-SW version of that cellular automaton.
See also the formula section.
First differs from A169779 at a(11).

Examples

			Also, written as an irregular triangle in which the row lengths are the terms of A011782 (the number of compositions of n, n >= 0), the sequence begins:
0;
1;
2,   5;
6,   9, 14, 21;
22, 25, 30, 37, 42, 53, 70, 85;
86, 89, 94,101,106,117,134,149,154,165,182,201,222,261,310,341;
...
It appears that the first column gives 0 together with the terms of A047849, hence the right border gives A002450.
It appears that this triangle only shares with A151920 the positive elements of the columns 1, 2, 4, 8, 16, ... (the powers of 2).
		

Crossrefs

Programs

  • Mathematica
    Accumulate[Nest[Join[#, 2 # + Append[Rest@#, 1]] &, {0}, 6]] (* Ivan Neretin, Feb 09 2017 *)

Formula

It appears that a(n) + a(n-1) = A139250(n), n >= 1.
It appears that a(2n-1) = A162795(n), n >= 1.
It appears that a(n) = (A169707(n+1) - 1)/4.

A079315 Number of cells that change from OFF to ON at stage n of the cellular automaton described in A079317.

Original entry on oeis.org

0, 1, 4, 4, 12, 4, 20, 12, 44, 4, 52, 12, 76, 12, 100, 36, 172, 4, 180, 12, 204, 12, 228, 36, 300, 12, 324, 36, 396, 36, 468, 108, 684, 4, 692, 12, 716, 12, 740, 36, 812, 12, 836, 36, 908, 36, 980, 108, 1196, 12, 1220, 36, 1292, 36, 1364, 108, 1580, 36, 1652, 108, 1868
Offset: 0

Views

Author

N. J. A. Sloane, Feb 12 2003

Keywords

Comments

Start with cell (0,0) ON; at each succeeding stage the cells that share exactly one edge with an active cell change their state.
This is not the CA discussed by Singmaster in the reference given in A079314. That was an error based on my misreading of the paper. - N. J. A. Sloane, Aug 05 2009

References

  • D. Singmaster, On the cellular automaton of Ulam and Warburton, M500 Magazine of the Open University, #195 (December 2003), pp. 2-7.

Crossrefs

Programs

  • Mathematica
    wt[n_] := DigitCount[n, 2, 1];
    A147582[n_] := If[n == 1, 1, 4*3^(wt[n-1]-1)];
    A151914[n_] := Switch[n, 0, 0, 1, 4, _, (8/3)*Sum[3^wt[i], {i, 1, n-1}]+4];
    a[n_] := If[OddQ[n], A147582[(n-1)/2+1], A151914[n/2]];
    Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Apr 21 2024 *)

Formula

a(2n+1) = A147582(n+1), a(2n) = A151914(n).

Extensions

More terms from John W. Layman, Oct 30 2003
Edited by N. J. A. Sloane, Aug 05 2009

A256264 Partial sums of A256263.

Original entry on oeis.org

0, 1, 2, 5, 6, 9, 14, 21, 22, 25, 30, 37, 42, 53, 70, 85, 86, 89, 94, 101, 106, 117, 134, 149, 154, 165, 182, 205, 234, 269, 310, 341, 342, 345, 350, 357, 362, 373, 390, 405, 410, 421, 438, 461, 490, 525, 566, 597, 602, 613, 630, 653, 682, 717, 758, 805, 858, 917, 982, 1053, 1130, 1213, 1302, 1365
Offset: 0

Views

Author

Omar E. Pol, Mar 30 2015

Keywords

Comments

First differs from A255747 at a(27).

Examples

			Also, written as an irregular triangle in which the row lengths are the terms of A011782, the sequence begins:
0,
1,
2,   5,
6,   9, 14,  21,
22, 25, 30,  37,  42,  53,  70,  85;
86, 89, 94, 101, 106, 117, 134, 149, 154, 165, 182, 205, 234, 269,310,341;
...
It appears that the first column gives 0 together with the terms of A047849, hence the right border gives A002450.
It appears that this triangle at least shares with the triangles from the following sequences; A151920, A255737, A255747, A256249, the positive elements of the columns k, if k is a power of 2.
From _Omar E. Pol, Jan 02 2016: (Start)
Illustration of initial terms in the fourth quadrant of the square grid:
---------------------------------------------------------------------------
n    a(n)                 Compact diagram
---------------------------------------------------------------------------
0     0     _
1     1    |_|_ _
2     2      |_| |
3     5      |_ _|_ _ _ _
4     6          |_| | | |
5     9          |_ _| | |
6    14          |_ _ _| |
7    21          |_ _ _ _|_ _ _ _ _ _ _ _
8    22                  |_| | | |_ _  | |
9    25                  |_ _| | |_  | | |
10   30                  |_ _ _| | | | | |
11   37                  |_ _ _ _| | | | |
12   42                  | | |_ _ _| | | |
13   53                  | |_ _ _ _ _| | |
14   70                  |_ _ _ _ _ _ _| |
15   85                  |_ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
16   86                                  |_| | | |_ _  | |_ _ _ _ _ _  | |
17   89                                  |_ _| | |_  | | |_ _ _ _ _  | | |
18   94                                  |_ _ _| | | | | |_ _ _ _  | | | |
19  101                                  |_ _ _ _| | | | |_ _ _  | | | | |
20  106                                  | | |_ _ _| | | |_ _  | | | | | |
21  117                                  | |_ _ _ _ _| | |_  | | | | | | |
22  134                                  |_ _ _ _ _ _ _| | | | | | | | | |
23  149                                  |_ _ _ _ _ _ _ _| | | | | | | | |
24  154                                  | | | | | | |_ _ _| | | | | | | |
25  165                                  | | | | | |_ _ _ _ _| | | | | | |
26  182                                  | | | | |_ _ _ _ _ _ _| | | | | |
27  205                                  | | | |_ _ _ _ _ _ _ _ _| | | | |
28  234                                  | | |_ _ _ _ _ _ _ _ _ _ _| | | |
29  269                                  | |_ _ _ _ _ _ _ _ _ _ _ _ _| | |
30  310                                  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _| |
31  341                                  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|
.
a(n) is also the total number of cells in the first n regions of the diagram. A256263(n) gives the number of cells in the n-th region of the diagram.
(End)
		

Crossrefs

Programs

  • Mathematica
    Accumulate@Flatten@Join[{0}, NestList[Join[#, Range[Length[#] - 1]*6 - 1, {2 #[[-1]] + 1}] &, {1}, 5]] (* Ivan Neretin, Feb 14 2017 *)

Formula

a(n) = (A256260(n+1) - 1)/4.

A256249 Partial sums of A006257 (Josephus problem).

Original entry on oeis.org

0, 1, 2, 5, 6, 9, 14, 21, 22, 25, 30, 37, 46, 57, 70, 85, 86, 89, 94, 101, 110, 121, 134, 149, 166, 185, 206, 229, 254, 281, 310, 341, 342, 345, 350, 357, 366, 377, 390, 405, 422, 441, 462, 485, 510, 537, 566, 597, 630, 665, 702, 741, 782, 825, 870, 917, 966, 1017, 1070, 1125, 1182, 1241, 1302, 1365, 1366, 1369, 1374
Offset: 0

Views

Author

Omar E. Pol, Mar 20 2015

Keywords

Comments

Also total number of ON states after n generations in one of the four wedges of the one-step rook version (or in one of the four quadrants of the one-step bishop version) of the cellular automaton of A256250.
A006257 gives the number of cells turned ON at n-th stage.
First differs from A255747 at a(11).
First differs from A169779 at a(10).
It appears that the odd terms (a bisection) give A256250.

Examples

			Written as an irregular triangle T(n,k), k >= 1, in which the row lengths are the terms of A011782 the sequence begins:
   0;
   1;
   2,  5;
   6,  9, 14, 21;
  22, 25, 30, 37, 46, 57, 70, 85;
  86, 89, 94,101,110,121,134,149,166,185,206,229,254,281,310,341;
  ...
Right border, a(2^m-1), gives A002450(m) for m >= 0.
a(2^m-2) = A203241(m) for m >= 2.
It appears that this triangle at least shares with the triangles from the following sequences; A151920, A255737, A255747, the positive elements of the columns k, if k is a power of 2.
From _Omar E. Pol_, Jan 03 2016: (Start)
Illustration of initial terms in the fourth quadrant of the square grid:
---------------------------------------------------------------------------
n    a(n)                 Compact diagram
---------------------------------------------------------------------------
0     0     _
1     1    |_|_ _
2     2      |_| |
3     5      |_ _|_ _ _ _
4     6          |_| | | |
5     9          |_ _| | |
6    14          |_ _ _| |
7    21          |_ _ _ _|_ _ _ _ _ _ _ _
8    22                  |_| | | | | | | |
9    25                  |_ _| | | | | | |
10   30                  |_ _ _| | | | | |
11   37                  |_ _ _ _| | | | |
12   46                  |_ _ _ _ _| | | |
13   57                  |_ _ _ _ _ _| | |
14   70                  |_ _ _ _ _ _ _| |
15   85                  |_ _ _ _ _ _ _ _|
.
a(n) is also the total number of cells in the first n regions of the diagram. A006257(n) gives the number of cells in the n-th region of the diagram.
(End)
		

Crossrefs

Programs

Formula

a(n) = (A256250(n+1) - 1)/4.

A151917 a(0)=0, a(1)=1; for n>=2, a(n) = (2/3)*(Sum_{i=1..n-1} 3^wt(i)) + 1, where wt() = A000120().

Original entry on oeis.org

0, 1, 3, 5, 11, 13, 19, 25, 43, 45, 51, 57, 75, 81, 99, 117, 171, 173, 179, 185, 203, 209, 227, 245, 299, 305, 323, 341, 395, 413, 467, 521, 683, 685, 691, 697, 715, 721, 739, 757, 811, 817, 835, 853, 907, 925, 979, 1033, 1195, 1201, 1219
Offset: 0

Views

Author

N. J. A. Sloane, Aug 05 2009, Aug 06 2009

Keywords

Comments

Also, total number of "ON" cells at n-th stage in two of the four wedges of the "Ulam-Warburton" two-dimensional cellular automaton of A147562, but including the central ON cell. It appears that this is very close to A139250, the toothpick sequence. - Omar E. Pol, Feb 22 2015

Examples

			n=3: (2/3)*(3^1+3^1+3^2+3^1) + 1 = (2/3)*18 + 1 = 13.
		

Crossrefs

Programs

  • Mathematica
    Array[(2/3) Sum[3^(Total@ IntegerDigits[i, 2]), {i, # - 1}] + 1 &, 50] (* Michael De Vlieger, Nov 01 2022 *)
  • PARI
    a(n) = if (n<2, n, 1 + 2*sum(i=1,n-1, 3^hammingweight(i))/3); \\ Michel Marcus, Feb 22 2015

Formula

a(n) = A151914(n)/4.
a(n) = A079315(2n)/4.
For n>=2, a(n) = 2*A151920(n-2) + 1.
For n>=1, a(n) = (1 + A147562(n))/2. - Omar E. Pol, Mar 13 2011
a(2^k) = A007583(k), if k >= 0. - Omar E. Pol, Feb 22 2015

A183060 Number of "ON" cells at n-th stage in a simple 2-dimensional cellular automaton (see Comments for precise definition).

Original entry on oeis.org

0, 1, 4, 7, 14, 17, 24, 31, 50, 53, 60, 67, 86, 93, 112, 131, 186, 189, 196, 203, 222, 229, 248, 267, 322, 329, 348, 367, 422, 441, 496, 551, 714, 717, 724, 731, 750, 757, 776, 795, 850, 857, 876, 895, 950, 969, 1024, 1079, 1242, 1249, 1268, 1287
Offset: 0

Views

Author

Omar E. Pol, Feb 20 2011

Keywords

Comments

On the semi-infinite square grid, start with all cells OFF.
Turn a single cell to the ON state in row 1.
At each subsequent step, each cell with exactly one neighbor ON is turned ON, and everything that is already ON remains ON.
The sequence gives the number of "ON" cells after n stages. A183061 (the first differences) gives the number of cells turned "ON" at the n-th stage.
Note that this is just half plus the rest of the center line of the cellular automaton described in A147562.
After 2^k stages the structure resembles an isosceles right triangle. For a three-dimensional version using cubes see A186410. For more information see A147562.

Examples

			Illustration of the structure after eight stages in which we label the generations of cells turned ON by consecutive numbers:
         8
        878
       8 6 8
      8765678
     8 8 4 8 8
    878 434 878
   8 6 4 2 4 6 8
  876543212345678
...................
There are 50 "ON" cells so a(8) = 50.
		

Crossrefs

Programs

  • Mathematica
    A183060[0] = 0; A183060[n_] := Total[With[{m = n - 1}, CellularAutomaton[{4042387958, 2, {{0, 1}, {-1, 0}, {0, 0}, {1, 0}, {0, -1}}}, {{{1}}, 0}, {{{m}}, -m}]], 2] (* JungHwan Min, Jan 24 2016 *)
    A183060[0] = 0; A183060[n_] := Total[With[{m = n - 1}, CellularAutomaton[{686, {2, {{0, 2, 0}, {2, 1, 2}, {0, 2, 0}}}, {1, 1}}, {{{1}}, 0}, {{{m}}, -m}]], 2] (* JungHwan Min, Jan 24 2016 *)

Formula

a(n) = n + (A147562(n) - 1)/2, n >= 1.
a(n) = n + 2*A151920(n-2), n >= 2.
a(2^n) = A076024(n+1). - Nathaniel Johnston, Mar 14 2011

Extensions

Comments edited by Omar E. Pol, Mar 19 2011 at the suggestion of John W. Layman and Franklin T. Adams-Watters
Showing 1-10 of 14 results. Next