|
|
A161355
|
|
Smallest number whose square begins and ends with the same n digits, and with any other digit(s) in between.
|
|
4
|
|
|
11, 173, 3489, 16262, 193744, 2445865, 38981039, 112791955, 1580178016, 10578937381, 36363636364, 1010690961795, 14451789007487, 104501463604086, 1242844268897055, 11773101257925379, 181883353790860701, 1818181815181818182, 11678332116788271168
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
11^2 = 121; 173^2= 29929; 3489^2= 12173121; 16262^2= 264452644; etc.
|
|
LINKS
|
|
|
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 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|