OFFSET
1,1
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
LINKS
Max Alekseyev, Table of n, a(n) for n = 1..32
EXAMPLE
a(3)=264 since 264^2 = 69696 is the smallest square that starts and ends with the same 3 digits.
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 *)
PROG
(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, ", "));
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Arkadiusz Wesolowski, Feb 28 2014
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
STATUS
approved