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

A238712 Numbers in which squares may end (in base 10).

Original entry on oeis.org

0, 1, 4, 5, 6, 9, 16, 21, 24, 25, 29, 36, 41, 44, 49, 56, 61, 64, 69, 76, 81, 84, 89, 96, 100, 104, 116, 121, 124, 129, 136, 144, 156, 161, 164, 169, 176, 184, 196, 201, 204, 209, 216, 224, 225, 236, 241, 244, 249, 256, 264, 276, 281, 284, 289, 296, 304
Offset: 1

Views

Author

M. F. Hasler, Mar 03 2014

Keywords

Comments

The union of "squares mod 10" (= the first 6 terms) and "squares mod 100" (A010461) and "squares mod 1000" (A122986) etc.
The number of terms < 10^k beginning with k=0: 1, 6, 24, 165, 1101, 9306, 79620, 753462, 7198791, 70919559, ... - Robert G. Wilson v, Sep 04 2014

Examples

			6 is in the sequence because 4^2 = 16 ends in the digit 6.
7 is not in the sequence because no square can end with the digit 7.
		

Crossrefs

Cf. A161355, A246422, A246448 (Complement).

Programs

  • Mathematica
    mx = 3; t = Union@ Table[ Mod[n^2, 10^mx], {n, 10^mx/2}]; t = Union@ Flatten@ Table[ Mod[t, 10^m], {m, mx}] (* Robert G. Wilson v, Sep 04 2014 *)
  • PARI
    a=[];for(m=1,3,a=setunion(a,Set(vector(10^m,n,n^2)%10^m)));a

Formula

If n is present so is n^2. - Robert G. Wilson v, Sep 04 2014

A230604 Smallest number whose square has more than n digits and begins and ends with the same n digits.

Original entry on oeis.org

11, 173, 264, 16262, 193744, 238165, 38981039, 112791955, 1580178016, 1052631579, 30762132977, 15020242915, 14451789007487, 10909090909091, 1242844268897055, 1001889106154509, 4024018444782046, 10018891061545090, 11678332116788271168, 102040816316530612245, 139009056141395353279, 1128182832632197435939
Offset: 1

Views

Author

Arkadiusz Wesolowski, Feb 28 2014

Keywords

Comments

Differs from A161355 in that the present sequence allows an "overlap" of the digits, while A161355 requires a(n)^2 to have at least 2n digits. - M. F. Hasler, Mar 03 2014

Examples

			a(3)=264 since 264^2 = 69696 is the smallest square that starts and ends with the same 3 digits.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Block[{digits = {}},
      For[i = Ceiling[Sqrt[10^n]], True, i++,
       If[i^2 >= 10^n, digits = IntegerDigits[i^2];
        If[Take[digits, n] == Take[digits, -n], Return[i]]]]];
    a2[#] & /@ Range[1, 6] (* Julien Kluge, Feb 02 2016 *)
  • PARI
    for(n=1, 8, k=floor(sqrt(10^n)); until(bn==ed, k++; sr=Str(k^2); vc=Vec(sr); ln=#sr; bn=vc[1..n]; ed=vc[ln-n+1..ln]); print1(k, ", "));

Extensions

a(9)-a(10) from Julien Kluge, Feb 13 2016
a(11)-a(12) from Julien Kluge, Mar 04 2016
a(13) from Giovanni Resta, Apr 18 2016
Terms a(14) onward from Max Alekseyev, Oct 11 2024

A202780 Smallest number whose cube begins and ends with the same n digits, and with any other digit(s) in between.

Original entry on oeis.org

7, 108, 335, 6667, 104636, 333335, 4504625, 70585736, 333333335, 1818181815, 33531510511, 333333333335, 198817904169
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jan 06 2012

Keywords

Examples

			335^3 = 37595375 starts and ends with the same 3 digits.
		

Crossrefs

Cf. A161355.

Programs

  • Mathematica
    lst = {}; Do[n = Ceiling[(10^(2*k))^(1/3)]; While[True, d = IntegerDigits[n^3]; If[Take[d, k] == Take[d, -k], Break[]]; n++]; AppendTo[lst, n], {k, 6}]; lst

Extensions

a(9)-a(10) from Donovan Johnson, Jan 12 2012
a(11)-a(13) from Giovanni Resta, Apr 18 2016
Showing 1-3 of 3 results.