OFFSET
0,3
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..65537
FORMULA
For all n, a(4*n) = a(27*n) = a((p^p)*n) = a(A099309(n)) = 0.
a(p) = p for all primes p.
EXAMPLE
For n = 15, if we iterate with A003415, we get a path 15 -> 8 -> 12 -> 16 -> 32 -> 80 -> 176 -> 368 -> ..., where the terms just keep on growing without ever reaching a prime or 1, therefore a(15) = 0.
For n = 18, its path down to zero, when iterating A003415 is: 18 -> 21 -> 10 -> 7 -> 1 -> 0, and the first noncomposite term on the path is prime 7, therefore a(18) = 7.
PROG
(PARI)
A003415checked(n) = if(n<=1, 0, my(f=factor(n), s=0); for(i=1, #f~, if(f[i, 2]>=f[i, 1], return(0), s += f[i, 2]/f[i, 1])); (n*s));
A351078(n) = { while(n>1&&!isprime(n), n = A003415checked(n)); (n); };
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Antti Karttunen, Feb 11 2022
STATUS
approved