OFFSET
1,1
EXAMPLE
25 -> 1000 -> 1.
MATHEMATICA
f[n_] := (Times @@ Select[IntegerDigits[n], # > 1 &])^3; q[n_, len_] := (v = Nest[f, n, len - 1]) != 1 && f[v] == 1; Select[Range[4505], q[#, 2] &] (* Amiram Eldar, Mar 10 2022 *)
PROG
(PARI) f(n) = vecprod(apply(x->x^3, select(x->(x>1), digits(n)))); \\ A352172
isok2(n) = {for (k=1, 2, n = f(n); if ((n==1), return(k==2)); ); }
(Python)
from math import prod
def A352172(n): return prod(int(d)**3 for d in str(n) if d != '0')
def ok(x):
x = A352172(x)
return x != 1 and A352172(x) == 1
print([k for k in range(4506) if ok(k)]) # Michael S. Branicky, Mar 10 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Marcus, Mar 10 2022
STATUS
approved