OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..171 (all terms up to k = 10 million)
EXAMPLE
273 is in the sequence because 273^2 = 74529 and 273|92547.
MAPLE
with(numtheory):T:=array(1..94):k:=1:for n from 1 to 200000 do: n0:=n^2:l:=length(n0) :s:=0:for m from l by -1 to 1 do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10): n0:=v :s:=s+ u*10^(m-1):od:if irem(s, n)=0 then T[k]:=n:k:=k+1:else fi: od:print(T):
MATHEMATICA
Select[Range[1000], Mod[FromDigits[Reverse[IntegerDigits[ (#)^2 ]]], # ]==0 & ]
Select[Range[8000], Divisible[IntegerReverse[#^2], #]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 12 2016 *)
PROG
(PARI) isok(k) = !(fromdigits(Vecrev(digits(k^2))) % k); \\ Michel Marcus, Aug 20 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, May 15 2010
EXTENSIONS
Edited by Charles R Greathouse IV, Aug 02 2010
STATUS
approved