OFFSET
2,13
FORMULA
For n >= 2, a(n) = min{m : sopf^m(n) is prime} where sopf^m indicates m iterations of sopf, the sum of the prime factors function.
EXAMPLE
a(15) = 2 because 15 is not prime, sopf(15) = 8 is not prime, and sopf^2(15) = sopf(8) = 2 is prime.
a(16) = 1 because 16 is not prime and sopf(16) = 2 is prime.
a(17) = 0 because 17 is prime.
PROG
(MATLAB)
for n=2:101
s = n;
c = 0;
while ~isprime(s)
s = sum(unique(factor(s)));
c = c + 1;
end
a(n) = c;
end
CROSSREFS
KEYWORD
nonn
AUTHOR
J. W. Montgomery, Mar 29 2023
STATUS
approved