The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A288507 Least number k such that both prime(k+1) -/+ prime(k) are products of n prime factors (counting multiplicity). 1
24, 319, 738, 57360, 1077529, 116552943 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,1
COMMENTS
Prime(k) + prime(k+1) cannot be semiprime, so the offset is 3.
For n=3 to 8, all terms k happen to satisfy prime(k+1) - prime(k) = 2^n. - Michel Marcus, Jul 24 2017
LINKS
EXAMPLE
n = 8: k = 116552943, p = prime(k) = 2394261637, q = prime(k+1) = 2394261893; both q-p = 2^8 and p+q = 2*3^2*5*7^3*155119 are 8-almost primes (A046310).
PROG
(PARI) a(n) = my(k = 1, p = 2, q = nextprime(p+1)); while((bigomega(p+q)!= n) || (bigomega(p-q)!= n), k++; p = q; q = nextprime(p+1)); k; \\ Michel Marcus, Jul 24 2017
(Python)
from sympy import factorint, nextprime
def A288507(n):
k, p, q = 1, 2, 3
while True:
if sum(factorint(q-p).values()) == n and sum(factorint(q+p).values()) == n:
return k
k += 1
p, q = q, nextprime(q) # Chai Wah Wu, Jul 23 2017
CROSSREFS
Sequence in context: A004413 A319554 A069779 * A199301 A239793 A289706
KEYWORD
nonn,more
AUTHOR
Zak Seidov, Jun 10 2017
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 13 06:37 EDT 2024. Contains 372498 sequences. (Running on oeis4.)