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 A296375 #31 Dec 28 2017 00:57:17 %S A296375 2,3,5,7,6,13,10,19,14,29,21,37,20,43,33,34,24,61,67,30,73,57,44,40, %T A296375 52,101,63,85,109,74,93,86,137,76,149,111,157,163,60,173,88,117,105, %U A296375 193,197,199,211,84,147,229,90,114,241,96,257,215,136,201,277,281,283,164,172,126,313,317,331,337 %N A296375 Least x such that sigma(x) = prime(n)+1, where sigma = A000203. %C A296375 a(n) <= prime(n). %H A296375 Charles R Greathouse IV, <a href="/A296375/b296375.txt">Table of n, a(n) for n = 1..10000</a> %e A296375 For n=5, prime(5)+1 = 12; sigma(x) = 12 for x=6 and x=11, so a(5) = 6. %p A296375 N:= 100: # to get a(1)..a(N) %p A296375 for i from 1 to N do T(ithprime(i)):= i od: %p A296375 count:= 0: %p A296375 for n from 1 while count < N do %p A296375 v:= numtheory:-sigma(n); %p A296375 if T(v)::posint then %p A296375 A[T(v)]:= n; %p A296375 T(v):= 0; %p A296375 count:= count+1; %p A296375 fi %p A296375 od: %p A296375 seq(A[i],i=1..N); %o A296375 (PARI) first(n) = my(res = vector(n), p = 2); for(k=1, n, for(x=2, p, if(sigma(x) == p+1, res[k] = x; break())); p = nextprime(p+1)); res \\ _Iain Fox_, Dec 28 2017 %o A296375 (PARI) first(n)=my(v=vector(n),P=primes(n),left=n,t); forfactored(x=2,P[n], t=setsearch(P,sigma(x)-1); if(t && v[t]==0, v[t]=x[1]; if(left--==0, return(v)))) \\ _Charles R Greathouse IV_, Dec 28 2017 %Y A296375 Cf. A066077. %K A296375 nonn %O A296375 1,1 %A A296375 _Robert Israel_, Dec 27 2017