OFFSET
1,1
COMMENTS
The sequence of squares starts: 1225, 1444, 2116, 4225, 5776, 6889, 7225, 101124, 112225, 121104, 128881, 144400, ...
By definition the sequence only contains numbers whose square has an even number of digits in base 10.
The sequence of middle digits starts: 2, 4, 1, 2, 7, 8, 2, 1, 2, 1, 8, 4, 6, 4, 0, ...
LINKS
EXAMPLE
46 is in this sequence because its square, 2116, has its two middle digits equal to 1.
MAPLE
a:= proc(n) option remember; local k, kk, t;
for k from 1+`if`(n=1, 0, a(n-1)) do kk:=k^2;
t:= length(kk);
if t::even and irem(parse(substring(""||kk,
t/2..t/2+1)), 11)=0 then return k fi
od
end:
seq(a(n), n=1..80); # Alois P. Heinz, Dec 22 2016
MATHEMATICA
TakeEvenCenter[k_List] :=
If[EvenQ[Length[k]], k[[{Length[k]/2, Length[k]/2 + 1}]], {}]; Module[{rz},
Select[Range[
1000], (rz = TakeEvenCenter[IntegerDigits[#^2, 10]];
Length[rz] == 2 && Equal @@ rz) &]]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Olivier GĂ©rard, Dec 12 2016
STATUS
approved