A177900 Smallest positive integer k such that the sum of the proper divisors of k gives the n-th prime, or 0 if prime(n) belongs to A005114.
0, 4, 0, 8, 21, 27, 39, 65, 57, 115, 32, 155, 63, 50, 129, 235, 265, 371, 305, 201, 98, 365, 237, 171, 245, 291, 485, 309, 325, 327, 128, 189, 279, 917, 1507, 1529, 242, 785, 489, 835, 865, 1211, 385, 605, 579, 965, 338, 2321, 669, 1115, 687, 1165, 399, 2629, 549, 1285, 595, 1841, 1025, 603, 1385, 715, 3809, 921, 1175, 939, 4121, 1655, 805, 1325
Offset: 1
Keywords
Examples
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.
Links
- Robert G. Wilson v, Table of n, a(n) for n = 1..10000
Programs
-
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 *)
-
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
Formula
a(n) = A070015(p_n) where p runs through the primes. - Robert G. Wilson v, Jul 09 2014
Extensions
Offset corrected to 1 by Michel Marcus, Jul 09 2014
Comments