OFFSET
1,1
COMMENTS
Mersenne primes p = 2^k - 1 (A000668) are terms: sigma((p + 1) / 2) = sigma((2^k - 1 + 1) / 2) = sigma(2^(k - 1)) = 2^k - 1 = p.
2801 is the smallest term of the form 6*k + 5. The next one is 39449441. Note that both of them are of the form 1 + t + t^2 + t^3 + t^4 where t is a prime number. - Altug Alkan, Oct 03 2017
EXAMPLE
Prime 13 is a term because there is prime 17 with sigma((17 + 1) / 2) = sigma(9) = 13.
MATHEMATICA
max = 10^6; Select[Union@ Reap[Do[If[PrimeQ@ #, Sow@ #] &@DivisorSigma[1, (Prime@ i + 1)/2], {i, max}] ][[-1, 1]], # < Prime[max]/2 &] (* Michael De Vlieger, Sep 16 2017, corrected by Amiram Eldar, Oct 08 2021 *)
PROG
(Magma) m := 5*10^7; Set(Sort([SumOfDivisors((n+1) div 2): n in [1..2*m] | IsPrime(n) and IsPrime(SumOfDivisors((n+1) div 2)) and SumOfDivisors((n+1) div 2) le m])); // corrected by Amiram Eldar, Oct 08 2021
(PARI) lista(nn) = {my(list = List()); forprime(p=3, 2*nn, if (isprime(q=sigma((p+1)/2)), listput(list, q)); ); select(x->(x <= nn), vecsort(Vec(list))); } \\ Michel Marcus, Oct 08 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Jaroslav Krizek, Sep 16 2017
STATUS
approved