login
Search: a371622 -id:a371622
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) is the first prime p such that p - 2 and p + 2 both have exactly n prime factors, counted with multiplicity.
+10
2
5, 23, 173, 2693, 32587, 495637, 4447627, 35303123, 717591877, 928090627, 69692326373, 745041171877, 5012236328123, 64215009765623, 945336806640623, 8885812685546873
OFFSET
1,1
COMMENTS
a(n) is the first prime p such that A001222(p - 2) = A001222(p + 2) = n.
3*10^9 < a(13) <= 5012236328123.
3*10^9 < a(14) <= 64215009765623.
FORMULA
a(n) > 2*A154704(n) for n > 1.
EXAMPLE
a(3) = 173 because 173 is prime, 173 - 2 = 171 = 3^2 * 19 and 173 + 2 = 175 = 5^2 * 7 are both products of 3 primes with multiplicity, and no smaller number works.
MAPLE
V:= Vector(8):
p:= 3: count:= 0:
while count < 8 do
p:= nextprime(p);
i:= numtheory:-bigomega(p-2);
if i <= 8 and V[i] = 0 and numtheory:-bigomega(p+2) = i
then V[i]:= p; count:= count+1
fi
od:
convert(V, list);
PROG
(Python)
from sympy import primeomega, nextprime
def A371651(n):
p = 3
while True:
if n == primeomega(p-2) == primeomega(p+2):
return p
p = nextprime(p) # Chai Wah Wu, Apr 02 2024
(PARI)
generate(A, B, n) = A=max(A, 2^n); (f(m, p, j) = my(list=List()); if(j==1, forprime(q=max(p, ceil(A/m)), B\m, my(t=m*q); if(isprime(t-2) && bigomega(t-4) == n, listput(list, t-2))), forprime(q = p, sqrtnint(B\m, j), list=concat(list, f(m*q, q, j-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)); if(#v >= 1, return(v[1])); x=y+1; y=2*x); \\ Daniel Suteu, Apr 13 2024
CROSSREFS
Cf. A001222. Contained in A371622.
KEYWORD
nonn,more
AUTHOR
Robert Israel, Apr 01 2024
EXTENSIONS
a(11) from Michael S. Branicky, Apr 01 2024
a(12) from Michael S. Branicky, Apr 02 2024
a(13) from Chai Wah Wu, Apr 04 2024
a(14)-a(16) from Daniel Suteu, Apr 13 2024
STATUS
approved
Numbers k such that k - 2 and k + 2 have the same number of prime factors, counted with multiplicity.
+10
2
5, 8, 9, 10, 12, 15, 21, 23, 24, 36, 37, 38, 39, 45, 53, 58, 60, 67, 68, 69, 81, 84, 86, 89, 93, 99, 100, 102, 105, 110, 111, 112, 113, 117, 120, 121, 129, 131, 134, 138, 143, 144, 154, 157, 165, 172, 173, 178, 184, 185, 188, 195, 203, 204, 207, 211, 215, 216, 217, 219, 225, 230, 231, 240, 244
OFFSET
1,1
COMMENTS
Numbers k such that A001222(k - 2) = A001222(k + 2).
LINKS
EXAMPLE
a(4) = 10 is a term because 10 - 2 = 8 = 2^3 and 10 + 2 = 12 = 2^2 * 3 are both products of 3 primes, counted with multiplicity.
MAPLE
M:= map(numtheory:-bigomega, [$1..10^3]):
select(k -> M[k-2] = M[k+2], [$3 .. 10^3 - 2]);
MATHEMATICA
Select[Range[3, 245], PrimeOmega[#-2]==PrimeOmega[#+2]&] (* Stefano Spezia, Apr 01 2024 *)
CROSSREFS
Cf. A001222. Contains A371622.
KEYWORD
nonn
AUTHOR
Robert Israel, Apr 01 2024
EXTENSIONS
Suggested by Joerg Arndt
STATUS
approved

Search completed in 0.005 seconds