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

%I #22 Jul 24 2017 01:55:14

%S 24,319,738,57360,1077529,116552943

%N Least number k such that both prime(k+1) -/+ prime(k) are products of n prime factors (counting multiplicity).

%C Prime(k) + prime(k+1) cannot be semiprime, so the offset is 3.

%C For n=3 to 8, all terms k happen to satisfy prime(k+1) - prime(k) = 2^n. - _Michel Marcus_, Jul 24 2017

%e 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).

%o (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

%o (Python)

%o from sympy import factorint, nextprime

%o def A288507(n):

%o k, p, q = 1, 2, 3

%o while True:

%o if sum(factorint(q-p).values()) == n and sum(factorint(q+p).values()) == n:

%o return k

%o k += 1

%o p, q = q, nextprime(q) # _Chai Wah Wu_, Jul 23 2017

%Y Cf. A001043, A001223, A046310, A251600.

%K nonn,more

%O 3,1

%A _Zak Seidov_, Jun 10 2017

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 23 16:14 EDT 2024. Contains 372765 sequences. (Running on oeis4.)