|
|
A218013
|
|
Numbers that divide the product of the nonzero digits (in base 10) of their square.
|
|
5
|
|
|
1, 2, 3, 5, 6, 8, 28, 36, 42, 54, 75, 192, 216, 288, 486, 525, 648, 768, 864, 882, 1728, 2160, 3024, 6048, 6075, 7056, 7680, 17280, 18144, 20736, 30240, 40824, 56448, 60480, 61236, 62208, 64512, 84672, 122472, 138915, 150528, 387072, 408240, 497664, 622080
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
For n=5, n^2 is 25; the product of the digits of 25 is 2 * 5 = 10, which is divisible by n=5.
|
|
PROG
|
(PARI) isok(n) = digs = digits(n^2); (prod(i=1, #digs, if (digs[i], digs[i], 1)) % n) == 0; \\ Michel Marcus, Aug 12 2013
(Python)
from operator import mul
from functools import reduce
from gmpy2 import t_mod, mpz
A218013 = [n for n in range(1, 10**6) if not t_mod(reduce(mul, (mpz(d) for d in str(n**2) if d != '0')), n)] # Chai Wah Wu, Aug 23 2014
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|