A239213 Squares that are divisible by each of their nonzero digits.
1, 4, 9, 36, 100, 144, 324, 400, 784, 900, 1024, 1296, 1444, 1764, 2304, 2500, 2916, 3600, 9216, 10000, 10404, 11664, 12100, 12996, 14400, 19044, 22500, 24336, 26244, 28224, 32400, 36864, 39204, 40000, 41616, 44100, 48400, 69696, 78400, 82944, 90000, 93636
Offset: 1
Examples
39204 is in the sequence because 39204 is divisible by 3, 9, 2 and 4.
Links
- Colin Barker, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
dnzQ[n_]:=And@@Divisible[n,Select[IntegerDigits[n],#!=0&]]; Select[ Range[ 500]^2,dnzQ] (* Harvey P. Dale, Dec 04 2014 *)
-
PARI
isOK(n) = my(v=vecsort(digits(n^2), , 8)); for(i=1+(v[1]==0), #v, if(n^2%v[i], return(0))); 1 s=[]; for(n=1, 1000, if(isOK(n), s=concat(s, n^2))); s
Comments