login
A327968
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.
9
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, 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, 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
OFFSET
0,7
COMMENTS
Of the prime terms, 5 seems to be the most common (8886 occurrences among the first 100001 terms). See also A327975.
PROG
(PARI)
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
A327938(n) = { my(f = factor(n)); for(k=1, #f~, f[k, 2] = (f[k, 2]%f[k, 1])); factorback(f); };
A327965(n) = if(n<=1, 0, A327938(A003415(n)));
A327968(n) = if(n<=1, 0, if(isprime(n), 1, while((n>1)&&!isprime(n), n = A327965(n)); (n)));
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 02 2019
STATUS
approved