cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A218013 Numbers that divide the product of the nonzero digits (in base 10) of their square.

Original entry on oeis.org

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
Offset: 1

Views

Author

Nels Olson, Oct 18 2012

Keywords

Examples

			For n=5, n^2 is 25; the product of the digits of 25 is 2 * 5 = 10, which is divisible by n=5.
		

Crossrefs

Cf. A002473.
Related to A218072. Subsets of this sequence include A218029 and A218030.

Programs

  • 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