OFFSET
1,1
COMMENTS
A Ruth-Aaron pair consists of two consecutive integers (k,k+1) such that sopf(k) = sopf(k+1) where sopf(x) is the sum of the distinct prime factors of x (A008472).
The present sequence is those k for which this common sopf(k) = sopf(k+1) is prime.
LINKS
Numberphile, Aaron Numbers.
Eric Weisstein's World of Mathematics, Ruth-Aaron Pair.
Wikipedia, Ruth-Aaron pair.
EXAMPLE
1682 is a term because the pair (1682, 1683) is a Ruth-Aaron pair with sum of prime factors 2 + 29 = 3 + 11 + 17 = 31 which is prime.
MAPLE
SumPF := n -> add(NumberTheory:-PrimeFactors(n)):
aList := proc(upto) local s0, s1, L, k; s0, s1 := 2, 3; L := NULL;
for k from 1 to upto do s0, s1 := s1, SumPF(k + 1);
if s0 = s1 then if isprime(s0) then L := L, k fi fi;
od; L end: aList(13000); # Peter Luschny, Jun 11 2024
MATHEMATICA
s[n_] := s[n] = Plus @@ FactorInteger[n][[;; , 1]]; Select[Range[10^6], PrimeQ[s[#]] && s[# + 1] == s[#] &] (* Amiram Eldar, May 11 2024 *)
PROG
(Python)
from sympy import isprime, primefactors
for k in range(10**6):
s0, s1 = sum(primefactors(k)), sum(primefactors(k + 1))
if s0 == s1 and isprime(s0): print(k, end=', ') # Jason Yuen, Jun 05 2024
(PARI) sopf(n) = my(f=factor(n)); sum(i=1, #f[, 1], f[i, 1]); \\ A008472
isok(n) = my(s=sopf(n)); isprime(s) && (s==sopf(n+1)); \\ Michel Marcus, May 11 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gerardo Salcido Martinez, May 01 2024
EXTENSIONS
More terms from Michel Marcus, May 11 2024
STATUS
approved