OFFSET
1,2
COMMENTS
Subsequence of squares in A007602. - Michel Marcus, Aug 24 2014
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..143
EXAMPLE
2916 is in the sequence because (1) it is a square, (2) the product of its digits is 2*9*1*6=108 and (3) 2916 is divisible by 108.
MATHEMATICA
sdpdQ[n_]:=Module[{idn=IntegerDigits[n]}, !MemberQ[idn, 0]&&Divisible[ n, Times@@idn]]; Select[Range[40000]^2, sdpdQ] (* Harvey P. Dale, Jul 04 2013 *)
PROG
(Python)
from operator import mul
from functools import reduce
from gmpy2 import t_mod, mpz
A118548 = [n for n in (x**2 for x in range(1, 10**6)) if not (str(n).count('0') or t_mod(n, reduce(mul, (mpz(d) for d in str(n)))))]
# Chai Wah Wu, Aug 23 2014
(PARI) lista(nn) = {for (n=1, nn, sq = n^2; d = digits(sq); p = prod(k=1, #d, d[k]); if (p && !(sq % p), print1(sq, ", ")); ); } \\ Michel Marcus, Aug 24 2014
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Luc Stevens (lms022(AT)yahoo.com), May 03 2006
STATUS
approved