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.

A305719 Numbers whose squares have the same first and last digits.

Original entry on oeis.org

1, 2, 3, 11, 22, 26, 39, 41, 68, 75, 97, 101, 109, 111, 119, 121, 129, 131, 139, 141, 202, 208, 212, 218, 222, 225, 235, 246, 254, 256, 264, 303, 307, 313, 319, 321, 329, 331, 339, 341, 349, 351, 359, 361, 369, 371, 379, 381, 389, 391, 399, 401, 409, 411, 419, 421, 429, 431, 439, 441, 638
Offset: 1

Views

Author

Neville Holmes, Jun 08 2018

Keywords

Examples

			For k = 11, k^2 = 121;
for k = 26, k^2 = 676.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[638], (d = IntegerDigits[#^2]; d[[1]] == d[[-1]]) &] (* Giovanni Resta, Jun 25 2018 *)
  • PARI
    for(n=1, 10^3, my(d=digits(n^2)); if( d[1]==d[#d], print1(n,", "))); \\ Joerg Arndt, Jun 10 2018
    
  • Python
    def ok(n): s = str(n*n); return s[0] == s[-1]
    print(list(filter(ok, range(1, 639)))) # Michael S. Branicky, Jul 16 2021

A116499 Numbers k such that the base-10 representation of k^2 has the structure dmmd, where d is a single digit and m is a string of digits.

Original entry on oeis.org

63565788, 777035126, 785900449264170834, 824735400720481514, 41969556121016094021, 7841042904081599033746826, 775474811976872476373043200886, 403578381989727694739321538082071713672671, 820657465670154825723396137907157085701046
Offset: 1

Views

Author

Giovanni Resta, Feb 18 2006

Keywords

Examples

			785900449264170834^2 = 6[17639516153625555][17639516153625555]6.
		

Crossrefs

A116502 Squares with structure dmdmd, where d is a single digit and m a string of digits.

Original entry on oeis.org

69696, 56722567225, 95540955409, 1108033241108033241, 1220096161220096161, 4312080784312080784, 4432132964432132964, 4880384644880384644, 9024307889024307889, 9972299169972299169, 946308825294630882529, 11542927396115429273961, 46171709584461717095844
Offset: 1

Views

Author

Giovanni Resta, Feb 18 2006

Keywords

Examples

			309097^2 = a(3) = 9[5540]9[5540]9.
		

Crossrefs

Programs

  • Mathematica
    w={}; Do[s = Reduce[(1 + 10^(1+e) + 100^(1+e)) d + 10 (1+10^(1+e)) x == y^2 && 0 <= x < 10^e && y>0, {x,y}, Integers]; If[s =!= False, w = Union[w, y^2 /. List@ ToRules@ s]], {e, 12}, {d, 9}]; w (* Giovanni Resta, Aug 01 2018 *)

Formula

a(n) = A116501(n)^2.

Extensions

a(11)-a(13) from Giovanni Resta, Aug 01 2018

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

A216233 Numbers whose squares have 2R-1 digits, such that the number represented by leftmost R digits and number represented by rightmost R digits divide each other evenly.

Original entry on oeis.org

245, 249, 251, 255, 264, 1245, 1249, 2490, 2498, 2502, 2510, 10984, 12490, 12498, 15449, 18735, 18751, 18868, 22714, 24980, 24996, 27907, 28302, 31225, 31249, 31579, 101852, 124996, 139535, 152174, 187494, 187510, 218751, 238165, 249992, 279070, 281249
Offset: 1

Views

Author

Thomas S. Pedigo, Mar 14 2013

Keywords

Comments

Trivial solutions where the rightmost R digits are all zeros have been omitted. The first indices k for which the rightmost R digits of a(k)^2 do not contain leading zeros are 5, 12, 15, 19, 26, 27, 30, 34, 39, 52, 53, 62, 67, 80.

Examples

			The square of 22714 is 515925796, and 51592 = 2*25796.
		

Crossrefs

Programs

  • Mathematica
    cnt = 0; Do[p = 10^Floor[nd/2]; Do[x = Floor[n*n/p]; y = Mod[n*n, 10*p]; If[y>0 && Mod[x,y]*Mod[y,x] == 0, Print[++cnt, " ", n, " ", n*n]], {n, p, Floor[10^(nd/2)]}], {nd,3,11,2}] (* Giovanni Resta, Mar 15 2013 *)

Extensions

Missing a(25) and a(27)-a(37) from Giovanni Resta, Mar 15 2013
Comment corrected by Giovanni Resta, Mar 15 2013
Showing 1-5 of 5 results.