login
Let n = prime(1)^c_1 * prime(2)^c_2 * ... * prime(k)^c_k be the prime factorization of n. Set f(n) = n - 1 + c_1 + c_2 + ... + c_k and f_i, i>=0 (f_0(n) = n, f_1=f) is i-th iteration of f. a(n) is the minimal i such that f_i(n) is prime.
3

%I #33 Jun 13 2021 03:21:03

%S 0,0,1,0,1,0,2,2,1,0,4,0,3,2,1,0,3,0,2,2,1,0,2,3,2,1,6,0,5,0,4,6,5,4,

%T 3,0,3,2,1,0,3,0,2,1,1,0,5,6,5,5,4,0,3,2,1,2,1,0,18,0,18,17,15,16,15,

%U 0,14,14,13,0,12,0,13,12,11,11,10,0,9,9,1,0,8,9,8,7,6,0,5,5,4,4,3,2,1,0,2,1,1,0,2,0,1,1,1,0,16,0

%N Let n = prime(1)^c_1 * prime(2)^c_2 * ... * prime(k)^c_k be the prime factorization of n. Set f(n) = n - 1 + c_1 + c_2 + ... + c_k and f_i, i>=0 (f_0(n) = n, f_1=f) is i-th iteration of f. a(n) is the minimal i such that f_i(n) is prime.

%C Conjecture: a(n) exists for every n >= 2.

%H Amiram Eldar, <a href="/A213980/b213980.txt">Table of n, a(n) for n = 2..10000</a>

%e f_1(12) = 12+2+1-1 = 14, f_1(14) = 14+1+1-1 = 15, f_1(15) = 15+1+1-1 = 16, f_1(16) = 16+4-1 = 19.

%e Since to get to a prime we used 4 iterations, a(12)=4.

%t a[n_] := Block[{x = n, c = 0}, While[! PrimeQ[x], x = x-1 + Total[Last /@ FactorInteger[x]]; c++]; c]; a/@Range[2,109] (* _Giovanni Resta_, Feb 16 2013 *)

%Y f_1 is A222312.

%K nonn

%O 2,7

%A _Vladimir Shevelev_, Feb 15 2013

%E a(81) corrected by _Giovanni Resta_, Feb 16 2013