|
|
A346537
|
|
Squares that are divisible by the product of their nonzero digits.
|
|
0
|
|
|
1, 4, 9, 36, 100, 144, 400, 900, 1024, 1296, 2304, 2500, 2916, 3600, 10000, 11664, 12100, 14400, 22500, 32400, 40000, 41616, 78400, 82944, 90000, 102400, 110224, 121104, 122500, 129600, 152100, 176400, 186624, 200704, 202500, 219024, 230400, 250000, 260100, 291600
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
For the perfect square 1024 = 32^2 the product of its nonzero digits is 8 which divides 1024.
|
|
MATHEMATICA
|
Select[Range[500]^2, Divisible[#, Times @@ Select[IntegerDigits[#], #1 > 0 &]] &] (* Amiram Eldar, Jul 23 2021 *)
|
|
PROG
|
(Python)
from math import prod
def nzpd(n): return prod([int(d) for d in str(n) if d != '0'])
def ok(sqr): return sqr > 0 and sqr%nzpd(sqr) == 0
(PARI) isok(m) = issquare(m) && !(m % vecprod(select(x->(x>0), digits(m))));
lista(nn) = for (m=1, nn, if (isok(m^2), print1(m^2, ", "))); \\ Michel Marcus, Jul 23 2021
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|