OFFSET
1,1
COMMENTS
If n is a term then 10n is also a term.
n^2 must contain an 8, a 9, or both. - Harvey P. Dale, Jun 17 2022
EXAMPLE
621^2=385641 <=> 395641 = 629^2, so both 621 and 629 are terms.
43415=1884862225 <=>1994962225=44665^2, so both 43415 and 44665 are terms.
MATHEMATICA
fQ[n_]:=Block[{id=IntegerDigits@n^2}, (MemberQ[id, 8]||MemberQ[id, 9])&&
IntegerQ[Sqrt[FromDigits[id/.{8->9, 9->8}]]]]; Reap[Do[If[fQ[n], Sow[n]], {n, 10000000}]][[2, 1]]
Select[Range[10^7], Max[IntegerDigits[#^2]]>7&&IntegerQ[Sqrt[ FromDigits[ IntegerDigits[ #^2]/.{8->9, 9->8}]]]&] (* Harvey P. Dale, Jun 17 2022 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Zak Seidov, Nov 23 2013
STATUS
approved
