OFFSET
1,2
COMMENTS
a(n) > 0 for every n up to at least 2000000. - Ivan N. Ianakiev, Feb 23 2017
LINKS
R. J. Mathar, Table of n, a(n) for n = 1..100000
EXAMPLE
4 -> 4+2+2 = 8 -> 8+2+2+2 = 14 -> 14+2+7 = 23, prime, so a(4) = 23.
MAPLE
A282795 := proc(n)
local nrec;
nrec := n ;
while not isprime(nrec) and nrec <> 1 do
nrec := A075254(nrec) ;
end do:
nrec ;
end proc:
seq(A282795(n), n=1..90) ; # R. J. Mathar, Feb 23 2017
MATHEMATICA
f[n_]:=n+Total[Replace[{a_, b_}->a*b]/@FactorInteger[n]];
a[1]=1; a[n_]:=If[PrimeQ[n], n, Last[NestWhileList[f, n, !PrimeQ[#]&]]];
Array[a, 2000000] (* Ivan N. Ianakiev, Feb 23 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Weiss, Feb 21 2017
STATUS
approved