Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #9 Oct 02 2019 20:06:32
%S 0,0,1,1,1,1,5,1,3,5,7,1,1,1,5,2,2,1,7,1,5,7,13,1,11,7,2,1,2,1,31,1,5,
%T 5,19,3,2,1,7,1,17,1,41,1,3,1,7,1,7,5,1,5,5,1,3,1,23,13,31,1,23,1,5,5,
%U 3,7,61,1,7,2,59,1,1,1,1,1,5,7,71,1,11,1,43,1,31,13,1,2,3,1,11,5,5,19,5,5,17,1,7,1,3,1,5,1,41,71
%N a(0) = a(1) = 0, a(prime) = 1, and for all other numbers, a(n) = the first noncomposite reached when iterating A327965, or -1 if no noncomposite is ever reached.
%C Of the prime terms, 5 seems to be the most common (8886 occurrences among the first 100001 terms). See also A327975.
%H Antti Karttunen, <a href="/A327968/b327968.txt">Table of n, a(n) for n = 0..10000</a>
%H Antti Karttunen, <a href="/A327968/a327968.txt">Data supplement: n, a(n) computed for n = 0..100000</a>
%o (PARI)
%o A003415(n) = {my(fac); if(n<1, 0, fac=factor(n); sum(i=1, matsize(fac)[1], n*fac[i, 2]/fac[i, 1]))}; \\ From A003415
%o A327938(n) = { my(f = factor(n)); for(k=1, #f~, f[k,2] = (f[k,2]%f[k,1])); factorback(f); };
%o A327965(n) = if(n<=1,0,A327938(A003415(n)));
%o A327968(n) = if(n<=1,0,if(isprime(n),1, while((n>1)&&!isprime(n), n = A327965(n)); (n)));
%Y Cf. A003415, A189760, A327938, A327965, A327966, A327967, A327975, A327977.
%K nonn
%O 0,7
%A _Antti Karttunen_, Oct 02 2019