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.

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

Original entry on oeis.org

11, 173, 3489, 16262, 193744, 2445865, 38981039, 112791955, 1580178016, 10578937381, 36363636364, 1010690961795, 14451789007487, 104501463604086, 1242844268897055, 11773101257925379, 181883353790860701, 1818181815181818182, 11678332116788271168
Offset: 1

Views

Author

Claudio Meller, Jun 07 2009

Keywords

Comments

11^2 = 121; 173^2= 29929; 3489^2= 12173121; 16262^2= 264452644; etc.

Crossrefs

Cf. A230604.

Programs

  • Mathematica
    sol[nd_, ec_, ecv_] := Block[{r = Reduce[x*(1 + 10^(nd + ec)) + ecv*10^nd == y^2 && y > 0 && 10^(nd - 1) <= x < 10^nd, {x, y}, Integers]}, If[r === False, {}, y /. List@ToRules@r]]; all[nd_, ec_] := Block[{s, yy, my = 0}, Do[ s = sol[nd, ec, k]; If[s != {}, yy = Min[s]; If[my == 0, my = yy, my = Min[my, yy]]], {k, 0, 10^ec - 1}]; my]; a[n_] := Block[{v, md = 0}, While[(v = all[n, md]) == 0, md++]; v]; Array[a, 15] (* Giovanni Resta, Mar 01 2014 *)

Extensions

a(5) corrected by Arkadiusz Wesolowski, Feb 28 2014
a(9)-a(19) from Giovanni Resta, Feb 28 2014