24
The title of Numberphile's newest video, 13532385396179, is a fixed point of the following function f on the positive integers:
Let n be a positive integer. Write the prime factorization in the usual way, e.g. 60 = 22 · 3 · 5, in which the primes are written in increasing order, and exponents of 1 are omitted. Then bring exponents down to the line and omit all multiplication signs, obtaining a number f (n). [...] for example, f (60) = f (22 · 3 · 5) = 2235.
(The above definition is taken from Problem 5 of Five $1,000 Problems - John H. Conway)
Note that f (13532385396179) = f (13 · 532 · 3853 · 96179) = 13532385396179.
Task
Take a positive composite integer n
as input, and output f(n)
.
Another example
48 = 24 · 3, so f (48) = 243.
Testcases
More testcases are available here.
4 -> 22
6 -> 23
8 -> 23
48 -> 243
52 -> 2213
60 -> 2235
999 -> 3337
9999 -> 3211101
11+1 I'm still astonished that someone managed to find 13532385396179 as a disproof of the conjecture. I guess the $1000 prize would go some way to pay for the electricity used! :) – Wossname – 2017-06-09T10:21:37.097
7Without following the link it wasn't clear that the conjecture is that repeated applications of f(n) will always reach a prime (and of course f(p) = p if p is prime). 13532385396179 disproves the conjecture because it's both composite and a fixed opint. – Chris H – 2017-06-09T12:59:22.283