The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A085102 Go on adding the divisors of n starting from n in decreasing order until one gets a prime. a(n) = this prime, or 0 if no prime is obtained. 1
 0, 2, 3, 7, 5, 11, 7, 0, 13, 17, 11, 0, 13, 23, 23, 31, 17, 0, 19, 41, 31, 0, 23, 59, 31, 41, 0, 53, 29, 61, 31, 0, 47, 53, 47, 0, 37, 59, 0, 83, 41, 0, 43, 83, 0, 71, 47, 0, 0, 0, 71, 97, 53, 0, 71, 113, 79, 89, 59, 137, 61, 0, 103, 127, 83, 0, 67, 0, 0, 0, 71, 179, 73, 113, 0, 137, 0 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS 1. a(p) = p, where p is a prime, by definition. 2. If 2^k -1 is a Mersenne prime then a(2^(k-1)) = 2^k -1 else a(2^(k-1))= 0. 3. a(p^(2k+1)) = 0, if p is prime. LINKS EXAMPLE a(28) = 53 because 28+14+7+4 = 53 is prime. PROG (PARI) a(n) = {d = divisors(n); p = 0; forstep (i = #d, 1, -1, p += d[i]; if (isprime(p), return (p)); ); return (0); } \\ Michel Marcus, Sep 17 2013 CROSSREFS Cf. A085103. Sequence in context: A131880 A045790 A159842 * A087572 A085107 A241082 Adjacent sequences:  A085099 A085100 A085101 * A085103 A085104 A085105 KEYWORD nonn AUTHOR Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jul 03 2003 EXTENSIONS Corrected and extended by David Wasserman, Jan 26 2005 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified April 15 07:59 EDT 2021. Contains 342975 sequences. (Running on oeis4.)