OFFSET
1,1
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
a(2m) = 2m+2, a(p)= 2p if p is a prime.
a(n)= n + the smallest divisor (more than 1) of n.
a(p^k) = p^k + p if p is prime. - Robert Israel, Oct 21 2015
EXAMPLE
a(9) = 12 as 10 and 11 are coprime to 9. a(11) = 22 as 11 is a prime.
MAPLE
for n from 1 to 150 do if n=1 then printf(`%d, `, 2); fi: for k from n+1 to 2*n do if igcd(n, k)>1 then printf(`%d, `, k); break; fi: od: od:
# alternative:
2, seq(t + min(numtheory:-factorset(t)), t = 2..1000); # Robert Israel, Oct 21 2015
MATHEMATICA
Table[n+First@(First/@FactorInteger[n]), {n, 200}] (* Vladimir Joseph Stephan Orlovsky, Apr 08 2011 *)
PROG
(Haskell)
a061228 n = n + a020639 n -- Reinhard Zumkeller, May 06 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Apr 23 2001
EXTENSIONS
More terms from James A. Sellers, Apr 24 2001
STATUS
approved