A249760 Numbers k such that k+1 and sigma(k) are both primes.
2, 4, 16, 65536
Offset: 1
Examples
16 is a term because 16+1=17 and sigma(16)=31 are both primes.
Programs
-
Magma
[n: n in [1..10^8] | IsPrime(n+1) and IsPrime(SumOfDivisors(n))];
-
Mathematica
Select[Range[10^5], PrimeQ[# + 1]&& PrimeQ[DivisorSigma[1, #]] &] (* Vincenzo Librandi, Nov 14 2014 *)
Formula
a(n) = A249759(n) - 1.
Comments