A009101 Fixed point when iterating the function f on n, where f(x) = x + product of digits of x.
0, 102, 102, 102, 102, 10, 102, 102, 102, 102, 10, 102, 102, 102, 102, 20, 102, 102, 102, 60, 20, 110, 102, 110, 102, 50, 102, 140, 60, 110, 30, 70, 102, 50, 70, 50, 102, 170, 102, 102, 40, 140, 50, 80, 60, 140, 70, 110, 80, 150, 50, 170, 102, 202, 102, 80, 170, 110, 170
Offset: 0
Examples
f(5) = 10, f(10) = 10, hence a(5) = 10. f(19) = 28, f(28) = 44, f(44) = 60, f(60) = 60, hence a(19) = 60.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..30000 (first 1001 terms from Vincenzo Librandi)
- XKCD Forum, "Projectors" and other Math Puzzles by Vlad Mitlin
- Index entries for Colombian or self numbers and related sequences
Programs
-
Maple
a:= n-> (m-> `if`(m=0, n, a(n+m)))(mul(i, i=convert(n, base, 10))): seq(a(n), n=0..58); # Alois P. Heinz, Jun 21 2022
-
Mathematica
Table[FixedPoint[#+Times@@IntegerDigits[#]&,n],{n,0,60}] (* Harvey P. Dale, Oct 11 2012 *)
-
Python
from math import prod def f(x): return x + prod(map(int, str(x))) def a(n): x, fx = n, f(n) while x != fx: x, fx = fx, f(fx) return x print([a(n) for n in range(60)]) # Michael S. Branicky, Jun 21 2022
Extensions
Additional comments from Klaus Brockhaus, Mar 12 2006
Edited by N. J. A. Sloane, Aug 19 2008 at the suggestion of R. J. Mathar
Comments