OFFSET
1,2
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10919 (first 473 terms from Chai Wah Wu; terms <= 10^100)
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
Nels Olson, Oct 18 2012
STATUS
approved