This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A177900 #22 Jul 12 2014 18:05:40 %S A177900 0,4,0,8,21,27,39,65,57,115,32,155,63,50,129,235,265,371,305,201,98, %T A177900 365,237,171,245,291,485,309,325,327,128,189,279,917,1507,1529,242, %U A177900 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 %N 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. %C A177900 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." %H A177900 Robert G. Wilson v, <a href="/A177900/b177900.txt">Table of n, a(n) for n = 1..10000</a> %F A177900 a(n) = A070015(p_n) where p runs through the primes. - _Robert G. Wilson v_, Jul 09 2014 %e A177900 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. %p A177900 N:= 1000: # to get the first N terms %p A177900 A:= 'A': A[1]:= 0: A[3]:= 0: %p A177900 Primes:= [seq(ithprime(i),i=1..N)]: %p A177900 count:= 0: %p A177900 for k from 1 while count < N-2 do %p A177900 m:= numtheory:-sigma(k)-k; %p A177900 if member(m,Primes,'n') and not assigned(A[n]) then %p A177900 count:= count+1; %p A177900 A[n]:= k; %p A177900 fi %p A177900 od: %p A177900 seq(A[i],i=1..N); # _Robert Israel_, Jul 09 2014 %t A177900 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 *) %o A177900 (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 %Y A177900 Cf. A037020, A005114. %K A177900 nonn %O A177900 1,2 %A A177900 _John W. Layman_, Dec 15 2010 %E A177900 Offset corrected to 1 by _Michel Marcus_, Jul 09 2014