OFFSET
1,2
COMMENTS
Suggested by the following comment of T. D. Noe (see A037020): "Assuming the Goldbach conjecture, it is easy to show that all primes, except 2 and 5, are the sum of the proper divisors of some number."
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A070015(p_n) where p runs through the primes. - Robert G. Wilson v, Jul 09 2014
EXAMPLE
27 and 35 have the proper divisors {1,3,9} and {1,5,7}, respectively, both of which sum to prime(6)=13, and no positive integer smaller than 27 has this property. Thus a(6)=27.
MAPLE
N:= 1000: # to get the first N terms
A:= 'A': A[1]:= 0: A[3]:= 0:
Primes:= [seq(ithprime(i), i=1..N)]:
count:= 0:
for k from 1 while count < N-2 do
m:= numtheory:-sigma(k)-k;
if member(m, Primes, 'n') and not assigned(A[n]) then
count:= count+1;
A[n]:= k;
fi
od:
seq(A[i], i=1..N); # Robert Israel, Jul 09 2014
MATHEMATICA
f[n_] := DivisorSigma[1, n] - n; k = 1; t = Table[0, {1000}]; While[ k < 24001, a = f@ k; If[a < 1001 && t[[a]] == 0, t[[a]] = k]; k++]; tt = Table[t[[n]], {n, Prime@ Range@ 168}] (* Robert G. Wilson v, Jul 09 2014 *)
PROG
(PARI) a(n) = {p = prime(n); if ((p != 2) && (p != 5), k = 2; while ((sigma(k) - k) != p, k++); k; ); } \\ Michel Marcus, Jul 09 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
John W. Layman, Dec 15 2010
EXTENSIONS
Offset corrected to 1 by Michel Marcus, Jul 09 2014
STATUS
approved