OFFSET
1,2
COMMENTS
We ignore the exponents (all 0's) for the prime numbers beyond the greatest prime factor of n.
There are only two fixed points: a(1) = 1 and a(2) = 2.
Iterating the sequence starting from any n > 1 will always eventually reach the fixed point 2.
FORMULA
EXAMPLE
For n = 99:
- 99 = 11^1 * 7^0 * 5^0 * 3^2 * 2^0,
- the list of exponents is: 1 0 0 2 0,
- the run lengths are: 1 2 1 1,
- so a(99) = 7^1 * 5^2 * 3^1 * 2^1 = 1050.
PROG
(PARI) a(n) = { my (v=1, e=-1, k=0, r=0); forprime (p=2, oo, if (n==1, return (v*if (r, prime(k++)^r, 1)), if (e!=e=valuation(n, p), if (r, v*=prime(k++)^r; r=0)); r++; n/=p^e)) }
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jul 23 2022
STATUS
approved