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.

A285651 Binary representation of the diagonal from the corner to the origin of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 81", based on the 5-celled von Neumann neighborhood.

Original entry on oeis.org

1, 10, 1, 1110, 1, 111110, 1, 11111100, 11, 1111111100, 11, 111111111100, 11, 11111111111100, 11, 1111111111110000, 1111, 111111111111110000, 1111, 11111111111111110000, 1111, 1111111111111111110000, 1111, 111111111111111111110000, 1111
Offset: 0

Views

Author

Robert Price, Apr 23 2017

Keywords

Comments

Initialized with a single black (ON) cell at stage zero.

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.

Crossrefs

Programs

  • Mathematica
    CAStep[rule_, a_] := Map[rule[[10 - #]] &, ListConvolve[{{0, 2, 0},{2, 1, 2}, {0, 2, 0}}, a, 2],{2}];
    code = 81; stages = 128;
    rule = IntegerDigits[code, 2, 10];
    g = 2 * stages + 1; (* Maximum size of grid *)
    a = PadLeft[{{1}}, {g, g}, 0,Floor[{g, g}/2]]; (* Initial ON cell on grid *)
    ca = a;
    ca = Table[ca = CAStep[rule, ca], {n, 1, stages + 1}];
    PrependTo[ca, a];
    (* Trim full grid to reflect growth by one cell at each stage *)
    k = (Length[ca[[1]]] + 1)/2;
    ca = Table[Table[Part[ca[[n]] [[j]],Range[k + 1 - n, k - 1 + n]], {j, k + 1 - n, k - 1 + n}], {n, 1, k}];
    Table[FromDigits[Part[ca[[i]] [[i]], Range[i, 2 * i - 1]], 10], {i, 1, stages - 1}]

A285652 Binary representation of the diagonal from the origin to the corner of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 81", based on the 5-celled von Neumann neighborhood.

Original entry on oeis.org

1, 1, 100, 111, 10000, 11111, 1000000, 111111, 110000000, 11111111, 11000000000, 1111111111, 1100000000000, 111111111111, 110000000000000, 111111111111, 11110000000000000, 11111111111111, 1111000000000000000, 1111111111111111, 111100000000000000000
Offset: 0

Views

Author

Robert Price, Apr 23 2017

Keywords

Comments

Initialized with a single black (ON) cell at stage zero.

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.

Crossrefs

Programs

  • Mathematica
    CAStep[rule_, a_] := Map[rule[[10 - #]] &, ListConvolve[{{0, 2, 0},{2, 1, 2}, {0, 2, 0}}, a, 2],{2}];
    code = 81; stages = 128;
    rule = IntegerDigits[code, 2, 10];
    g = 2 * stages + 1; (* Maximum size of grid *)
    a = PadLeft[{{1}}, {g, g}, 0,Floor[{g, g}/2]]; (* Initial ON cell on grid *)
    ca = a;
    ca = Table[ca = CAStep[rule, ca], {n, 1, stages + 1}];
    PrependTo[ca, a];
    (* Trim full grid to reflect growth by one cell at each stage *)
    k = (Length[ca[[1]]] + 1)/2;
    ca = Table[Table[Part[ca[[n]] [[j]],Range[k + 1 - n, k - 1 + n]], {j, k + 1 - n, k - 1 + n}], {n, 1, k}];
    Table[FromDigits[Part[ca[[i]] [[i]], Range[i, 2 * i - 1]], 10], {i, 1, stages - 1}]

A285448 Least number x such that x^n has n digits equal to k. Case k = 1.

Original entry on oeis.org

1, 11, 58, 59, 171, 521, 391, 163, 1023, 1271, 1711, 4051, 1603, 3679, 9639, 3019, 13442, 5469, 14301, 17931, 24871, 31857, 20161, 24091, 33245, 33259, 35561, 36411, 30817, 110343, 51488, 52504, 37141, 77044, 105722, 138088, 61085, 83707, 127258, 85163, 38001, 148285
Offset: 1

Views

Author

Paolo P. Lava, Apr 19 2017

Keywords

Examples

			a(4) = 59 because 59^4 = 12117361 has 4 digits '1' and is the least number to have this property.
		

Crossrefs

Programs

  • Maple
    P:=proc(q,h) local a,j,k,n,t; for n from 1 to q do for k from 1 to q do
    a:=convert(k^n,base,10); t:=0; for j from 1 to nops(a) do if a[j]=h then t:=t+1; fi; od;
    if t=n then print(k); break; fi; od; od; end: P(10^9,1);
  • PARI
    A285448vec=(n,{k=1})->{my(L:list,c);L=List();for(t=1,n,forstep(y=1,+oo,1,c=digits(y^t);if(sum(j=1,#c,c[j]==k)==t,listput(L,y);break())));return(Vec(L))} \\ R. J. Cano, Apr 29 2017

A285450 Least number x such that x^n has n digits equal to k. Case k = 3.

Original entry on oeis.org

3, 56, 179, 34, 202, 536, 607, 1182, 1236, 3875, 3076, 2142, 4574, 5378, 9347, 14524, 2013, 8403, 13037, 9534, 20939, 1987, 28882, 27146, 16292, 34546, 48493, 85926, 52953, 48318, 64558, 116514, 49665, 90279, 46911, 117256, 61286, 139083, 120265, 199582, 170357
Offset: 1

Views

Author

Paolo P. Lava, Apr 19 2017

Keywords

Examples

			a(4) = 34 because 34^4 = 1336336 has 4 digits '3' and is the least number to have this property.
		

Crossrefs

Programs

  • Maple
    P:=proc(q,h) local a,j,k,n,t; for n from 1 to q do for k from 1 to q do
    a:=convert(k^n,base,10); t:=0; for j from 1 to nops(a) do if a[j]=h then t:=t+1; fi; od;
    if t=n then print(k); break; fi; od; od; end: P(10^9,3);
  • PARI
    a(n, k=3) = {my(j=1); while(#select(x->x==k, digits(j^n)) != n, j++); j;} \\ Michel Marcus, Apr 29 2017
    
  • PARI
    A285450vec=(n, {k=3})->{my(L:list, c); L=List(); for(t=1, n, forstep(y=1, +oo, 1, c=digits(y^t); if(sum(j=1, #c, c[j]==k)==t, listput(L, y); break()))); return(Vec(L))} \\ Returns a vector containing the first n terms. - R. J. Cano, Apr 29 2017

A285653 Decimal representation of the diagonal from the corner to the origin of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 81", based on the 5-celled von Neumann neighborhood.

Original entry on oeis.org

1, 2, 1, 14, 1, 62, 1, 252, 3, 1020, 3, 4092, 3, 16380, 3, 65520, 15, 262128, 15, 1048560, 15, 4194288, 15, 16777200, 15, 67108848, 15, 268435440, 15, 1073741808, 15, 4294967040, 255, 17179868928, 255, 68719476480, 255, 274877906688, 239, 1099511627536, 239
Offset: 0

Views

Author

Robert Price, Apr 23 2017

Keywords

Comments

Initialized with a single black (ON) cell at stage zero.

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.

Crossrefs

Programs

  • Mathematica
    CAStep[rule_, a_] := Map[rule[[10 - #]] &, ListConvolve[{{0, 2, 0},{2, 1, 2}, {0, 2, 0}}, a, 2],{2}];
    code = 81; stages = 128;
    rule = IntegerDigits[code, 2, 10];
    g = 2 * stages + 1; (* Maximum size of grid *)
    a = PadLeft[{{1}}, {g, g}, 0,Floor[{g, g}/2]]; (* Initial ON cell on grid *)
    ca = a;
    ca = Table[ca = CAStep[rule, ca], {n, 1, stages + 1}];
    PrependTo[ca, a];
    (* Trim full grid to reflect growth by one cell at each stage *)
    k = (Length[ca[[1]]] + 1)/2;
    ca = Table[Table[Part[ca[[n]] [[j]],Range[k + 1 - n, k - 1 + n]], {j, k + 1 - n, k - 1 + n}], {n, 1, k}];
    Table[FromDigits[Part[ca[[i]] [[i]], Range[i, 2 * i - 1]], 10], {i, 1, stages - 1}]
Showing 1-5 of 5 results.