A249903 Numbers n such that 2n+1 and sigma(n) are both noncomposite numbers.
1, 2, 9, 729
Offset: 1
Examples
Number 729 is in the sequence because 2*729 + 1 = 1459 and sigma(729) = 1093 (both primes).
Programs
-
Magma
[1] cat [n: n in [1..10000000] | IsPrime(2*n+1) and IsPrime(SumOfDivisors(n))]; // corrected by Vincenzo Librandi, Nov 14 2014
-
Mathematica
Join[{1}, Select[Range[0, 1000], PrimeQ[DivisorSigma[1, #]]&& PrimeQ[2 # + 1] &]] (* Vincenzo Librandi, Nov 14 2014 *) Join[{1},Select[Range[1000],AllTrue[{2#+1,DivisorSigma[1,#]},PrimeQ]&]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Oct 06 2019 *)
Comments