cp's OEIS Frontend

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.

Showing 1-2 of 2 results.

A292447 Primes p such that sigma((p + 1) / 2) is a prime q.

Original entry on oeis.org

3, 7, 17, 31, 127, 577, 3361, 4801, 6961, 8191, 31249, 131071, 171697, 524287, 982801, 1062881, 1104097, 1367857, 1407841, 1468897, 2705137, 3770257, 6822817, 7785457, 10941841, 14183137, 15557041, 18495361, 20749681, 25304497, 36278161, 38878561, 44575681
Offset: 1

Views

Author

Jaroslav Krizek, Sep 16 2017

Keywords

Comments

A companion sequence of A249902.
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.
A subsequence of A178490. - Altug Alkan, Oct 02 2017

Examples

			17 is a term because sigma((17 + 1) / 2) = sigma(9) = 13 (prime).
		

Crossrefs

Programs

  • Magma
    [n: n in [1..10^8] | IsPrime(n) and IsPrime(SumOfDivisors((n+1) div 2))];
    
  • Mathematica
    Select[Prime@ Range[10^6], PrimeQ@ DivisorSigma[1, (# + 1)/2] &] (* Michael De Vlieger, Sep 16 2017 *)
  • PARI
    lista(nn) = forprime(p=3, nn, if(isprime(sigma((p+1)/2)), print1(p, ", "))); \\ Altug Alkan, Oct 02 2017

Formula

a(n) = 2*A249902(n) - 1. - Altug Alkan, Oct 02 2017

A249903 Numbers n such that 2n+1 and sigma(n) are both noncomposite numbers.

Original entry on oeis.org

1, 2, 9, 729
Offset: 1

Views

Author

Jaroslav Krizek, Nov 14 2014

Keywords

Comments

If a(5) exists, it must be a square bigger than 3*10^8.
Intersection of A005097 and A023194.
Conjecture: 2 and 9 are the only numbers n such that 2n - 1, 2n + 1 and sigma(n) are all primes.
From Hiroaki Yamanouchi, Nov 19 2014: (Start)
a(n) (n >= 3) must be of the form 3^(2k) for some positive integer k.
a(5) (if it exists) >= 3^877000 (see A003306 and A028491).
(End)

Examples

			Number 729 is in the sequence because 2*729 + 1 = 1459 and sigma(729) = 1093 (both primes).
		

Crossrefs

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 *)
Showing 1-2 of 2 results.