(Translated by https://www.hiragana.jp/)
A085102 - OEIS
login
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
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.
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 A358242
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