%I #20 Sep 08 2022 08:45:04
%S 1,3,5,6,10,11,12,17,20,22,24,26,27,29,30,38,41,42,45,46,51,55,59,62,
%T 68,69,71,77,82,85,88,91,99,101,104,105,106,107,108,114,116,118,125,
%U 126,132,135,136,137,140,141,145,146,147,149,150,155,158,160,161
%N Numbers n such that sigma(n) + 1 is prime.
%H Harry J. Smith, <a href="/A065512/b065512.txt">Table of n, a(n) for n=1..1000</a>
%H OEIS Wiki, <a href="https://oeis.org/wiki/Cyclotomic Polynomials at x=n, n! and sigma(n)">Cyclotomic Polynomials at x=n, n! and sigma(n)</a>
%e sigma(10) + 1 = 18 + 1 = 19 (prime). sigma(24) + 1 = 60 + 1 = 61 (prime).
%p select(isprime @ (1+numtheory:-sigma), [$1..1000]); # _Robert Israel_, May 29 2015
%t Select[ Range[170], PrimeQ[ DivisorSigma[1, # ] + 1] & ]
%o (PARI) { n=0; for (m=1, 10^9, if (isprime(sigma(m) + 1), write("b065512.txt", n++, " ", m); if (n==1000, return)) ) } \\ _Harry J. Smith_, Oct 20 2009
%o (Magma) [n: n in [1..200] | IsPrime(1+SumOfDivisors(n))]; // _Vincenzo Librandi_, May 30 2015
%Y Cf. A000203, A088580, A258430.
%K nonn
%O 1,2
%A _Joseph L. Pe_, Nov 26 2001