login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A355161 Primes p such that p - prevprime(p) is not a power of 2. 0
29, 37, 53, 59, 67, 79, 89, 127, 137, 149, 157, 163, 173, 179, 191, 211, 223, 239, 251, 257, 263, 269, 277, 293, 307, 331, 337, 347, 359, 373, 379, 389, 419, 431, 439, 449, 479, 509, 521, 541, 547, 557, 563, 569, 577, 587, 593, 599, 607, 613 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
A130796(n) is prevprime(p).
A031925 and A031931 are subsequences, as 6 and 12 are not powers of 2.
LINKS
FORMULA
a(n) = A151800(A130796(n)).
MATHEMATICA
Select[Prime[Range[2, 120]], (d = # - NextPrime[#, -1]) != 2^IntegerExponent[d, 2] &] (* Amiram Eldar, Jun 22 2022 *)
PROG
(PARI) isp2(n) = my(p); (n==1) || (isprimepower(n, &p) && (p==2)); \\ A000079
isok(p) = isprime(p) && !isp2(p-precprime(p-1)) \\ Michel Marcus, Jun 22 2022
(Python)
from itertools import islice, count
from sympy import prime, prevprime
def A355161_gen(): # generator of terms
return filter(lambda n:((~(m:=n-prevprime(n))+1)&m)-m, (prime(n) for n in count(2)))
A355161_list = list(islice(A355161_gen(), 30)) # Chai Wah Wu, Aug 23 2022
CROSSREFS
Sequence in context: A234973 A134100 A060769 * A031925 A325058 A107134
KEYWORD
nonn
AUTHOR
Reed Michael Upson, Jun 21 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 7 03:31 EDT 2024. Contains 372300 sequences. (Running on oeis4.)