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

A151905 a(0) = a(2) = 0, a(1) = 1; for n >= 3, n = 3*2^k+j, 0 <= j < 3*2^k, a(n) = A151904(j).

Original entry on oeis.org

0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 4, 0, 0, 1, 1, 1, 4, 1, 1, 4, 4, 4, 13, 0, 0, 1, 1, 1, 4, 1, 1, 4, 4, 4, 13, 1, 1, 4, 4, 4, 13, 4, 4, 13, 13, 13, 40, 0, 0, 1, 1, 1, 4, 1, 1, 4, 4, 4, 13, 1, 1, 4, 4, 4, 13, 4, 4, 13, 13, 13, 40, 1, 1, 4, 4, 4, 13, 4, 4, 13, 13, 13, 40, 4, 4, 13, 13, 13, 40, 13
Offset: 0

Views

Author

N. J. A. Sloane, Jul 31 2009

Keywords

Comments

Consider the Holladay-Ulam CA shown in Fig. 2 and Example 2 of the Ulam article. Then a(n) is the number of cells turned ON in generation n in a 45-degree sector that are not on the main stem.

Examples

			If written as a triangle:
0,
1, 0,
0, 0, 1,
0, 0, 1, 1, 1, 4,
0, 0, 1, 1, 1, 4, 1, 1, 4, 4, 4, 13,
0, 0, 1, 1, 1, 4, 1, 1, 4, 4, 4, 13, 1, 1, 4, 4, 4, 13, 4, 4, 13, 13, 13, 40
0, 0, 1, 1, 1, 4, 1, 1, 4, 4, 4, 13, 1, 1, 4, 4, 4, 13, 4, 4, 13, 13, 13, 40, 1, 1, 4, 4, 4, 13, 4, 4, 13, 13, 13, 40, 4, 4, 13, 13, 13, 40, 13, 13, 40, 40, 40, 121,
...
then the rows converge to A151904.
		

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.

Crossrefs

Programs

  • Maple
    f := proc(n) local j; j:=n mod 6; if (j<=1) then 0 elif (j<=4) then 1 else 2; fi; end;
    wt := proc(n) local w,m,i; w := 0; m := n; while m > 0 do i := m mod 2; w := w+i; m := (m-i)/2; od; w; end;
    A151904 := proc(n) local k,j; k:=floor(n/6); j:=n-6*k; (3^(wt(k)+f(j))-1)/2; end;
    A151905 := proc (n) local k,j;
    if (n=0) then 0;
    elif (n=1) then 1;
    elif (n=2) then 0;
    else k:=floor( log(n/3)/log(2) ); j:=n-3*2^k; A151904(j); fi;
    end;
  • Mathematica
    wt[n_] := DigitCount[n, 2, 1];
    f[n_] := {0, 0, 1, 1, 1, 2}[[Mod[n, 6] + 1]];
    A151902[n_] := wt[Floor[n/6]] + f[n - 6 Floor[n/6]];
    A151904[n_] := (3^A151902[n] - 1)/2;
    a[n_] := Module[{k, j}, Switch[n, 0, 0, 1, 1, 2, 0, _, k = Floor[Log2[n/3]]; j = n - 3*2^k; A151904[j]]];
    Table[a[n], {n, 0, 90}] (* Jean-François Alcover, Feb 16 2023, after Maple code *)

A151907 Partial sums of A151906.

Original entry on oeis.org

0, 1, 5, 9, 13, 25, 29, 33, 45, 57, 69, 105, 109, 113, 125, 137, 149, 185, 197, 209, 245, 281, 317, 425, 429, 433, 445, 457, 469, 505, 517, 529, 565, 601, 637, 745, 757, 769, 805, 841, 877, 985, 1021, 1057, 1165, 1273, 1381, 1705, 1709, 1713, 1725, 1737, 1749, 1785, 1797
Offset: 0

Views

Author

David Applegate and N. J. A. Sloane, Jul 31 2009, Aug 03 2009

Keywords

Comments

a(n) is the total number of ON cells after n generations in the Holladay-Ulam CA shown in Fig. 2 and Example 2 of the Ulam article.
The definition of this CA given by Ulam on pp. 216, 222 is complicated (and incomplete). However, the same structure can be obtained as follows. Take the CA of A147562 but replace each square by a Maltese cross, a cluster of five adjacent squares:
..X..
.XXX.
..X..
We guess that this was how Holladay and Ulam originally constructed the CA.
This construction corresponds to the fact that the three trisections of the difference sequence A151906 are essentially A147582, A147582 and 3*A147582 respectively.

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.

Crossrefs

Formula

The definition in terms of A151906 provides an explicit formula for a(n).

A151906 a(0) = 0, a(1) = 1; for n>1, a(n) = 8*A151905(n) + 4.

Original entry on oeis.org

0, 1, 4, 4, 4, 12, 4, 4, 12, 12, 12, 36, 4, 4, 12, 12, 12, 36, 12, 12, 36, 36, 36, 108, 4, 4, 12, 12, 12, 36, 12, 12, 36, 36, 36, 108, 12, 12, 36, 36, 36, 108, 36, 36, 108, 108, 108, 324, 4, 4, 12, 12, 12, 36, 12, 12, 36, 36, 36, 108, 12, 12, 36, 36, 36, 108, 36, 36, 108, 108, 108
Offset: 0

Views

Author

David Applegate and N. J. A. Sloane, Jul 31 2009, Aug 03 2009

Keywords

Comments

Consider the Holladay-Ulam CA shown in Fig. 2 and Example 2 of the Ulam article. Then a(n) is the number of cells turned ON in generation n.

Examples

			From _Omar E. Pol_, Apr 02 2018: (Start)
Note that this sequence also can be written as an irregular triangle read by rows in which the row lengths are the terms of A011782 multiplied by 3, as shown below:
0,1, 4;
4,4,12;
4,4,12,12,12,36;
4,4,12,12,12,36,12,12,36,36,36,108;
4,4,12,12,12,36,12,12,36,36,36,108,12,12,36,36,36,108,36,36,108,108,108,324;
4,4,12,12,12,36,12,12,36,36,36,108,12,12,36,36,36,108,36,36,108,108,108,... (End)
		

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.

Crossrefs

Programs

  • Maple
    f := proc(n) local j; j:=n mod 6; if (j<=1) then 0 elif (j<=4) then 1 else 2; fi; end;
    wt := proc(n) local w,m,i; w := 0; m := n; while m > 0 do i := m mod 2; w := w+i; m := (m-i)/2; od; w; end;
    A151904 := proc(n) local k,j; k:=floor(n/6); j:=n-6*k; (3^(wt(k)+f(j))-1)/2; end;
    A151905 := proc (n) local k,j;
    if (n=0) then 0;
    elif (n=1) then 1;
    elif (n=2) then 0;
    else k:=floor( log(n/3)/log(2) ); j:=n-3*2^k; A151904(j); fi;
    end;
    A151906 := proc(n);
    if (n=0) then 0;
    elif (n=1) then 1;
    else 8*A151905(n) + 4;
    fi;
    end;
  • Mathematica
    wt[n_] := DigitCount[n, 2, 1];
    f[n_] := {0, 0, 1, 1, 1, 2}[[Mod[n, 6] + 1]];
    A151902[n_] := wt[Floor[n/6]] + f[n - 6 Floor[n/6]];
    A151904[n_] := (3^A151902[n] - 1)/2;
    A151905[n_] := Module[{k, j}, Switch[n, 0, 0, 1, 1, 2, 0, _, k = Floor[Log2[n/3]]; j = n - 3*2^k; A151904[j]]];
    a[n_] := Switch[n, 0, 0, 1, 1, _, 8 A151905[n] + 4];
    Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Feb 16 2023, after Maple code *)

Formula

The three trisections are essentially A147582, A147582 and 3*A147582 respectively. More precisely, For t >= 1, a(3t) = a(3t+1) = A147582(t+1) = 4*3^(wt(t)-1), a(3t+2) = 4*A147582(t+1) = 4*3^wt(t). See A151907 for explanation.

A151902 a(n) = wt(k) + f(j) if n = 6k+j, 0 <= j < 6, where wt() = A000120(), f() = A151899().

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 1, 1, 2, 2, 2, 3, 1, 1, 2, 2, 2, 3, 2, 2, 3, 3, 3, 4, 1, 1, 2, 2, 2, 3, 2, 2, 3, 3, 3, 4, 2, 2, 3, 3, 3, 4, 3, 3, 4, 4, 4, 5, 1, 1, 2, 2, 2, 3, 2, 2, 3, 3, 3, 4, 2, 2, 3, 3, 3, 4, 3, 3, 4, 4, 4, 5, 2, 2, 3, 3, 3, 4, 3, 3, 4, 4, 4, 5, 3, 3, 4, 4, 4, 5, 4, 4, 5, 5, 5, 6, 1, 1, 2, 2, 2, 3, 2, 2, 3
Offset: 0

Views

Author

N. J. A. Sloane, Jul 31 2009

Keywords

Crossrefs

Programs

  • Maple
    f := proc(n) local j; j:=n mod 6; if (j<=1) then 0 elif (j<=4) then 1 else 2; fi; end;
    wt := proc(n) local w,m,i; w := 0; m := n; while m > 0 do i := m mod 2; w := w+i; m := (m-i)/2; od; w; end;
    A151902 := proc(n) local k,j; k:=floor(n/6); j:=n-6*k; wt(k)+f(j); end;
  • Mathematica
    wt[n_] := DigitCount[n, 2, 1];
    f[n_] := {0, 0, 1, 1, 1, 2}[[Mod[n, 6] + 1]];
    a[n_] := wt[Floor[n/6]] + f[n - 6 Floor[n/6]];
    Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Feb 16 2023 *)

A151899 Period 6: repeat [0, 0, 1, 1, 1, 2].

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 0, 0, 1, 1, 1, 2, 0, 0, 1, 1, 1, 2, 0, 0, 1, 1, 1, 2, 0, 0, 1, 1, 1, 2, 0, 0, 1, 1, 1, 2, 0, 0, 1, 1, 1, 2, 0, 0, 1, 1, 1, 2, 0, 0, 1, 1, 1, 2, 0, 0, 1, 1, 1, 2, 0, 0, 1, 1, 1, 2, 0, 0, 1, 1, 1, 2, 0, 0, 1, 1, 1, 2, 0, 0, 1, 1, 1, 2, 0, 0, 1, 1, 1, 2, 0, 0, 1, 1, 1, 2, 0, 0, 1, 1, 1, 2, 0, 0, 1
Offset: 0

Views

Author

N. J. A. Sloane, Jul 31 2009

Keywords

Crossrefs

Programs

  • Magma
    [Abs( ((1-n) mod 3) - ((1+n) mod 2) ) : n in [0..100]]; // Wesley Ivan Hurt, Aug 20 2014
    
  • Maple
    f := proc(n) local j; j:=n mod 6; if (j<=1) then 0 elif (j<=4) then 1 else 2; fi; end;
    A151899:=n->[0, 0, 1, 1, 1, 2][(n mod 6)+1]: seq(A151899(n), n=0..100); # Wesley Ivan Hurt, Jun 20 2016
  • Mathematica
    Table[Abs[Mod[-n + 1, 3] - Mod[n + 1, 2]], {n, 0, 100}] (* Wesley Ivan Hurt, Aug 20 2014 *)
    CoefficientList[Series[(x^2 + x^3 + x^4 + 2 x^5)/(1 - x^6), {x, 0, 100}], x] (* Wesley Ivan Hurt, Aug 20 2014 *)
    LinearRecurrence[{0, 0, 0, 0, 0, 1},{0, 0, 1, 1, 1, 2},105] (* Ray Chandler, Aug 26 2015 *)
  • PARI
    a(n)=[0,0,1,1,1,2][n%6+1]; \\ Joerg Arndt, Aug 25 2014

Formula

a(n) = 5/6 - cos(Pi*n/3)/3 - sin(Pi*n/3)/sqrt(3) - cos(2*Pi*n/3)/3 - sin(2*Pi*n/3)/sqrt(3) - (-1)^n/6. - R. J. Mathar, Oct 08 2011
G.f.: (x^2+x^3+x^4+2*x^5)/(1-x^6); a(n) = abs( mod(1-n,3) - mod(1+n,2) ). - Wesley Ivan Hurt, Aug 20 2014
a(n) = a(n-6) for n>5. - Wesley Ivan Hurt, Jun 20 2016
Showing 1-5 of 5 results.