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”).

A335667
a(n) is the smallest even number k such that k-1 and k+1 are both n-almost primes.
1
4, 34, 274, 2276, 8126, 184876, 446876, 18671876, 95234374, 1144976876, 6018359374, 281025390626, 2068291015624, 6254345703124, 181171630859374, 337813720703126, 31079046044921876, 205337027587890626
OFFSET
1,1
COMMENTS
10^13 < a(15) <= 181171630859374. - Giovanni Resta, Jun 21 2020
EXAMPLE
a(1) = 4 since 4 - 1 and 4 + 1 are both primes.
a(2) = 34 since 34 - 1 = 33 = 3*11 and 34 + 1 = 35 = 5*7 are both semiprimes.
a(3) = 274 since 274 - 1 = 273 = 3*7*13 and 274 + 1 = 275 = 5^2 * 11 are both 3-almost primes.
MATHEMATICA
m = 8; v = Table[0, {m}]; c = 0; o1 = 1; n = 4; While[c < m, o2 = PrimeOmega[n + 1]; If[o1 == o2 && v[[o1]] == 0, c++; v[[o1]] = n]; o1 = o2; n += 2]; v
PROG
(PARI)
generate(A, B, n, k) = A=max(A, 2^n); (f(m, p, n) = my(list=List()); if(n==1, forprime(q=max(p, ceil(A/m)), B\m, if(bigomega(m*q+2) == k, listput(list, m*q+1))), forprime(q=p, sqrtnint(B\m, n), list=concat(list, f(m*q, q, n-1)))); list); vecsort(Vec(f(1, 3, n)));
a(n) = my(x=2^n, y=2*x); while(1, my(v=generate(x, y, n, n)); if(#v >= 1, return(v[1])); x=y+1; y=2*x); \\ Daniel Suteu, Jul 10 2023
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Zak Seidov and Amiram Eldar, Jun 17 2020
EXTENSIONS
a(12)-a(14) from Giovanni Resta, Jun 21 2020
a(15)-a(18) from Daniel Suteu, Jul 10 2023
STATUS
approved