OFFSET
1,2
COMMENTS
EXAMPLE
MATHEMATICA
pod[n_] := Times @@ IntegerDigits[n]; r[n_] := If[(p = pod[n]) > 0, pod[n^2]/p, 1/2]; Select[r /@ Range[200], IntegerQ] (* Amiram Eldar, Feb 21 2022 *)
PROG
(PARI) lista(nn) = {my(list=List()); for (m=1, nn, my(d=digits(m), q); if (vecmin(d) && denominator(q = vecprod(digits(m^2))/vecprod(d)) == 1, listput(list, q); ); ); Vec(list); } \\ Michel Marcus, Feb 21 2022
(Python)
from math import prod
from itertools import count, islice
def A351808_gen(): # generator of terms
return (q for q, r in (divmod(prod(int(d) for d in str(m**2)), prod(int(d) for d in str(m))) for m in count(1) if '0' not in str(m)) if r == 0)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Feb 20 2022
EXTENSIONS
More terms from Amiram Eldar, Feb 21 2022
STATUS
approved