OFFSET
2,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 2..10001
Eric Weisstein's World of Mathematics, Divisor Function.
FORMULA
EXAMPLE
The divisors of n = 50 are {1,2,5,10,25,50}, the sums of distinct divisors that are prime: 2, 3 = 2+1, 5, 7 = 5+2, 11 = 10+1, 13 = 10+2+1, 17 = 10+5+2, 31 = 25+5+1, 37 = 25+10+2, 41 = 25+10+5+1, 43 = 25+10+5+2+1, 53 = 50+2+1, 61 = 50+10+1, 67 = 50+10+5+2 and 83 = 50+25+5+2+1. Therefore a(50) = 83 < 89 = A070801(50) and A085381(3) = 50.
MATHEMATICA
a[n_] := Module[{d = Divisors[n], c, x}, c = Rest@CoefficientList[Series[Product[1 + x^d[[i]], {i, 1, Length[d]}], {x, 0, Total[d]}], x]; Max[Select[Position[c, _?(# > 0 &)] // Flatten, PrimeQ]]]; Array[a, 100, 2] (* Amiram Eldar, Mar 01 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jun 26 2003
STATUS
approved