OFFSET
1,1
COMMENTS
(p,p+2) is a twin prime pair if and only if a(p)=p+4.
For all positive integers n, there exists a positive integer m such that a(n)<a(m).
MAPLE
g:= proc(n) option remember;
if isprime(n) then n
else procname(convert(numtheory:-factorset(n), `+`))
fi
end proc:
g(1):= 0:
seq(2+g(2+g(i)), i=1..140);
PROG
(PARI) fp(n, pn) = if (n == pn, n, fp(vecsum(factor(n)[, 1]), n));
f(n) = if (n==1, 0, fp(n, 0)); \\ A075860
a(n) = f(f(n)+2)+2; \\ Michel Marcus, Jun 28 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Rafik Khalfi, Jun 28 2024
STATUS
approved