OFFSET
1,1
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
EXAMPLE
53 is a term because 53^2 = 2809 is not divisible by 2, 8 or 9.
MATHEMATICA
ndnzQ[n_]:=Count[n^2/Select[IntegerDigits[n^2], #!=0&], _?IntegerQ]==0; Select[Range[750], ndnzQ] (* Harvey P. Dale, Jun 02 2015 *)
PROG
(PARI) isOK(n) = my(v=vecsort(digits(n^2), , 8)); for(i=1+(v[1]==0), #v, if(n^2%v[i]==0, return(0))); 1
s=[]; for(n=1, 1000, if(isOK(n), s=concat(s, n))); s
(Python)
def ok(n): return not any(n*n%int(d) == 0 for d in str(n*n) if d != '0')
print(list(filter(ok, range(1, 614)))) # Michael S. Branicky, Jul 17 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Colin Barker, Mar 12 2014
STATUS
approved