login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Primes p such that there exist primes q, r (r != 2) such that p+1 = 2^q*r.
2

%I #15 May 01 2022 13:22:10

%S 11,19,23,43,67,103,151,163,211,223,283,331,383,487,523,547,607,631,

%T 691,787,823,907,991,1051,1123,1171,1303,1447,1531,1543,1663,1723,

%U 1783,1831,1867,1951,2011,2083,2143,2251,2347,2371,2467,2503,2647,2707,2731,2791

%N Primes p such that there exist primes q, r (r != 2) such that p+1 = 2^q*r.

%H Michael S. Branicky, <a href="/A352925/b352925.txt">Table of n, a(n) for n = 1..10000</a>

%H Roberto Conti and Pierluigi Contucci, <a href="https://arxiv.org/abs/2204.08982">A Natural Avenue</a>, arXiv:2204.08982 [math.NT], 2022.

%p f:= p-> (q-> andmap(isprime, [q, (p+1)/2^q]))(padic[ordp](p+1, 2)):

%p select(f, [ithprime(i)$i=1..500])[]; # _Alois P. Heinz_, May 01 2022

%t Select[Prime[Range[400]], PrimeQ[(q = IntegerExponent[# + 1, 2])] && PrimeQ[(# + 1)/2^q] &] (* _Amiram Eldar_, May 01 2022 *)

%o (Python)

%o from sympy import isprime, nextprime

%o from itertools import islice

%o def valuation(n, p):

%o v = 0

%o while n%p == 0: n //= p; v += 1

%o return v, n

%o def agen(): # generator of terms

%o p = 2

%o while True:

%o q, r = valuation(p+1, 2)

%o if isprime(q) and isprime(r): yield p

%o p = nextprime(p)

%o print(list(islice(agen(), 49))) # _Michael S. Branicky_, May 01 2022

%Y Cf. A005383, A352926.

%K nonn

%O 1,1

%A _N. J. A. Sloane_, May 01 2022

%E a(12) and beyond from _Michael S. Branicky_, May 01 2022