cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A382110 Smallest number k such that k-n and k+n are consecutive primes and k has exactly n distinct prime factors.

Original entry on oeis.org

4, 15, 154, 3045, 22386, 2467465, 3015870, 368961285, 6326289970, 2313524242029, 1568018377380, 5808562826801735, 1575649493651310, 6177821212870783905, 171718219950879367766, 2039004035049368722335, 13156579658122684173390, 112733682549950000276753015
Offset: 1

Views

Author

Jean-Marc Rebert, Mar 16 2025

Keywords

Comments

a(10) > 5*10^11, if it exists. - Amiram Eldar, Mar 18 2025
a(10) <= 2313524242029. a(11) <= 1811331573870. - Giorgos Kalogeropoulos, Mar 21 2025

Examples

			a(1) = 4, because 4 - 1 = 3 and 4 + 1 = 5 are two consecutive primes and omega(4) = 1.
a(2) = 15, because 15 - 2 = 13 and 15 + 2 = 17 are two consecutive primes and omega(15) = 2.
		

Crossrefs

Programs

  • Mathematica
    Do[k=0;Until[PrimeQ[k-n]&&NextPrime[k-n]==k+n&&PrimeNu[k]==n,k++];a[n]=k,{n,7}];Array[a,7] (* James C. McMahon, Mar 20 2025 *)
  • PARI
    list(len) = {my(v = vector(len), prv = 3, c = 0, d); forprime(p = 5, , d = (p-prv)/2; if(d <= len && v[d] == 0 && omega(prv+d) == d, c++; v[d] = prv + d; if(c == len, break)); prv = p); v;} \\ Amiram Eldar, Mar 18 2025
    
  • PARI
    generate(A, B, n) = A=max(A, vecprod(primes(n))); (f(m, p, j) = my(list=List()); forprime(q=p, sqrtnint(B\m, j), my(v=m*q); while(v <= B, if(j==1, if(v>=A && (nextprime(v) - v == n) && (v - precprime(v) == n), listput(list, v)), if(v*(q+1) <= B, list=concat(list, f(v, q+1, j-1)))); v *= q)); list); vecsort(Vec(f(1, if(n%2 == 0, 3, 2), n)));
    a(n) = my(x=vecprod(primes(n)), y=2*x); while(1, my(v=generate(x, y, n)); if(#v >= 1, return(v[1])); x=y+1; y=2*x); \\ Daniel Suteu, Mar 25 2025

Extensions

a(10)-a(18) from Daniel Suteu, Mar 25 2025