%I #10 Aug 23 2014 15:17:44
%S 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,
%T 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,
%U 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
%N 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.
%C 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.
%e a(28) = 53 because 28+14+7+4 = 53 is prime.
%o (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
%Y Cf. A085103.
%K nonn
%O 1,2
%A _Amarnath Murthy_ and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jul 03 2003
%E Corrected and extended by _David Wasserman_, Jan 26 2005