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.

A273234 Squares that remain squares if you decrease them by 8 times a repunit with the same number of digits.

Original entry on oeis.org

9, 889249, 896809, 908209, 902942754289, 924745719769, 946618081249, 987107822089, 910909843526089, 9810767198166489, 888909576913320169, 889214944824055249, 889286612895723249, 889972999762742809, 890923059538260849, 896642235371330809, 896979367708462809
Offset: 1

Views

Author

Paolo P. Lava, May 18 2016

Keywords

Comments

Any number ends in 9.

Examples

			9 - 8*1 = 1 = 1^2;
889249 - 8*111111 = 361 = 19^2;
896809 - 8*111111 = 7921 = 89^2.
		

Crossrefs

Programs

  • Maple
    P:=proc(q,h) local n; for n from 1 to q do
    if type(sqrt(n^2-h*(10^(ilog10(n^2)+1)-1)/9),integer) then print(n^2);
    fi; od; end: P(10^9,8);
  • Mathematica
    sol[k_] := Block[{x, e = IntegerLength@k, d = Divisors@ k}, Union[ #+k/# & /@ Select[ Take[d, Ceiling[ Length@d/2]], EvenQ[x = #+k/#] && IntegerLength[ x^2/4] == e &]]^2/4]; r[n_] := 8 (10^n-1)/9; Flatten[sol /@ r /@ Range[12]] (* Giovanni Resta, May 18 2016 *)

Extensions

a(11)-a(17) from Giovanni Resta, May 18 2016

A273231 Squares that remain squares if you decrease them by 4 times a repunit with the same number of digits.

Original entry on oeis.org

4, 97344, 462400, 473344, 506944, 846400, 78854400, 444622240000, 448417729600, 454125036544, 551027105344, 824681934400, 983984641600, 460651783840000, 6703941381760000, 444446222224000000, 459134832243732544, 462218702574222400, 462583182938702400
Offset: 1

Views

Author

Paolo P. Lava, May 18 2016

Keywords

Comments

Every term ends in 0 or 4.

Examples

			4 - 4*1 = 0 = 0^2;
97344 - 4*11111 = 52900 = 230^2;
462400 - 4*111111 = 17956 = 134^2.
		

Crossrefs

Programs

  • Maple
    P:=proc(q,h) local n; for n from 1 to q do
    if type(sqrt(n^2-h*(10^(ilog10(n^2)+1)-1)/9),integer) then print(n^2);
    fi; od; end: P(10^9,4);
  • Mathematica
    sol[k_] := Block[{x, e = IntegerLength@k, d = Divisors@ k}, Union[ #+k/# & /@ Select[ Take[d, Ceiling[ Length@d/2]], EvenQ[x = #+k/#] && IntegerLength[ x^2/4] == e &]]^2/4]; r[n_] := 4 (10^n-1)/9; Flatten[sol /@ r /@ Range[12]] (* Giovanni Resta, May 18 2016 *)

Extensions

a(16)-a(19) from Giovanni Resta, May 18 2016

A273232 Squares that remain squares if you decrease them by 5 times a repunit with the same number of digits.

Original entry on oeis.org

9, 64, 676, 6084, 56644, 556516, 605284, 669124, 702244, 743044, 784996, 835396, 8538084, 55562116, 60497284, 79673476, 6049417284, 7028810244, 96560590564, 555838838116, 567620600836, 575774404804, 604938617284, 612115334884, 619365852004, 643617898564, 817422124996
Offset: 1

Views

Author

Paolo P. Lava, May 18 2016

Keywords

Comments

Apart from the initial term, any number ends in 4 or 6.

Examples

			9 - 5*1 = 4 = 2^2;
64 - 5*11 = 9 = 3^2;
676 - 5*111 = 121 = 11^2.
		

Crossrefs

Programs

  • Maple
    P:=proc(q,h) local n; for n from 1 to q do
    if type(sqrt(n^2-h*(10^(ilog10(n^2)+1)-1)/9),integer) then print(n^2);
    fi; od; end: P(10^9,5);
  • Mathematica
    sol[k_] := Block[{x, e = IntegerLength@k, d = Divisors@ k}, Union[ #+k/# & /@ Select[ Take[d, Ceiling[ Length@d/2]], EvenQ[x = #+k/#] && IntegerLength[ x^2/4] == e &]]^2/4]; r[n_] := 5 (10^n-1)/9; Flatten[sol /@ r /@ Range[12]] (* Giovanni Resta, May 18 2016 *)

A273233 Squares that remain squares if you decrease them by 7 times a repunit with the same number of digits.

Original entry on oeis.org

81, 841, 7921, 77841, 790321, 863041, 982081, 9991921, 79014321, 80299521, 94653441, 7901254321, 8635799041, 778133930161, 790123654321, 794396081521, 816057482881, 965485073281, 989863816561, 79012347654321, 86358529399041, 857789228465521, 7901234587654321, 8547733055510401
Offset: 1

Views

Author

Paolo P. Lava, May 18 2016

Keywords

Comments

Any number ends in 1.

Examples

			81 - 7*11 = 4 = 2^2;
841 - 7*111 = 64 = 8^2;
7921 - 7*1111 = 144 = 12^2.
		

Crossrefs

Programs

  • Maple
    P:=proc(q,h) local n; for n from 1 to q do
    if type(sqrt(n^2-h*(10^(ilog10(n^2)+1)-1)/9),integer) then print(n^2);
    fi; od; end: P(10^9,7);
  • Mathematica
    sol[k_] := Block[{x, e = IntegerLength@k, d = Divisors@ k}, Union[ #+k/# & /@ Select[ Take[d, Ceiling[ Length@d/2]], EvenQ[x = #+k/#] && IntegerLength[ x^2/4] == e &]]^2/4]; r[n_] := 7 (10^n-1)/9; Flatten[sol /@ r /@ Range[12]] (* Giovanni Resta, May 18 2016 *)

A273301 Partial sums of the number of active (ON, black) cells in n-th stage of growth of two-dimensional cellular automaton defined by "Rule 633", based on the 5-celled von Neumann neighborhood.

Original entry on oeis.org

1, 5, 26, 55, 127, 215, 371, 531, 800, 1069, 1465, 1885, 2465, 3037, 3821, 4557, 5565, 6533, 7849, 9197, 10769, 12301, 14197, 15993, 18206, 20363, 22984, 25509, 28526, 31343, 34756, 37929, 41810, 45435, 49980, 54253, 59286, 64071, 69608, 74817, 80906, 86739
Offset: 0

Views

Author

Robert Price, May 19 2016

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

Cf. A273299.

Programs

  • Mathematica
    CAStep[rule_,a_]:=Map[rule[[10-#]]&,ListConvolve[{{0,2,0},{2,1,2},{0,2,0}},a,2],{2}];
    code=633; 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}];
    on=Map[Function[Apply[Plus,Flatten[#1]]],ca] (* Count ON cells at each stage *)
    Table[Total[Part[on,Range[1,i]]],{i,1,Length[on]}] (* Sum at each stage *)

A273303 First differences of number of active (ON, black) cells in n-th stage of growth of two-dimensional cellular automaton defined by "Rule 633", based on the 5-celled von Neumann neighborhood.

Original entry on oeis.org

3, 17, 8, 43, 16, 68, 4, 109, 0, 127, 24, 160, -8, 212, -48, 272, -40, 348, 32, 224, -40, 364, -100, 417, -56, 464, -96, 492, -200, 596, -240, 708, -256, 920, -272, 760, -248, 752, -328, 880, -256, 868, -352, 1040, -448, 1012, -632, 1512, -560, 1220, -640
Offset: 0

Views

Author

Robert Price, May 19 2016

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

Cf. A273299.

Programs

  • Mathematica
    CAStep[rule_,a_]:=Map[rule[[10-#]]&,ListConvolve[{{0,2,0},{2,1,2},{0,2,0}},a,2],{2}];
    code=633; 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}];
    on=Map[Function[Apply[Plus,Flatten[#1]]],ca] (* Count ON cells at each stage *)
    Table[on[[i+1]]-on[[i]],{i,1,Length[on]-1}] (* Difference at each stage *)

A273300 Number of active (ON, black) cells at stage 2^n-1 of the two-dimensional cellular automaton defined by "Rule 633", based on the 5-celled von Neumann neighborhood.

Original entry on oeis.org

1, 4, 29, 160, 736, 3173, 12909, 53145, 213949, 858525, 3442745, 13786177, 55183473, 220767853, 883161809, 3532951753
Offset: 0

Views

Author

Robert Price, May 19 2016

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

Cf. A273299.

Programs

  • Mathematica
    CAStep[rule_,a_]:=Map[rule[[10-#]]&,ListConvolve[{{0,2,0},{2,1,2},{0,2,0}},a,2],{2}];
    code=633; 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}];
    on=Map[Function[Apply[Plus,Flatten[#1]]],ca] (* Count ON cells at each stage *)
    Part[on,2^Range[0,Log[2,stages]]] (* Extract relevant terms *)

Extensions

a(8)-a(15) from Lars Blomberg, Jul 17 2016
Showing 1-7 of 7 results.