A352595 Positive integers that are fixed points for the map x->f^k(x) for some k>1, where f(x) is the product of squares of nonzero digits of x.
256, 324, 576, 3600, 11664, 15876, 20736, 44100, 63504, 65536, 129600, 2822400, 5308416, 7290000, 8294400
Offset: 1
Examples
256 -> 3600 -> 324 -> 576 -> 44100 -> 256 is a limit cycle of f, so all elements are terms.
Programs
-
Python
from math import prod from itertools import count, islice def f(n): return prod(int(d)**2 for d in str(n) if d != "0") def ok(n): n0, k, seen = n, 0, set(), while n not in seen: # iterate until fixed point or in cycle seen.add(n) n = f(n) k += 1 return n == n0 and k > 1 def agen(startk=1): for m in count(1): if ok(m): yield m print(list(islice(agen(), 11)))
Comments