login
A374104
a(n) = A075860(A075860(n) + 2) + 2.
0
4, 4, 7, 4, 9, 9, 5, 4, 7, 5, 15, 9, 4, 7, 4, 4, 21, 9, 9, 5, 5, 4, 7, 9, 9, 4, 7, 7, 33, 5, 5, 4, 7, 9, 9, 9, 4, 5, 4, 5, 45, 9, 4, 4, 4, 9, 9, 9, 5, 5, 5, 4, 4, 9, 4, 7, 4, 5, 63, 5, 9, 7, 5, 4, 9, 4, 4, 9, 4, 7, 75, 9, 4, 4, 4, 5, 9, 9, 5, 5, 7, 4, 15, 9, 4, 4, 4, 4, 9, 5, 5, 9
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
Sequence in context: A204156 A163106 A331619 * A258972 A146564 A048785
KEYWORD
nonn
AUTHOR
Rafik Khalfi, Jun 28 2024
STATUS
approved