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”).
%I #26 Jun 11 2023 14:18:55
%S 2,5,13,31,61,103,157,173,181,193,211,223,239,269,313,337,353,419,487,
%T 499,577,613,631,647,677,709,727,827,857,947,1039,1093,1117,1231,1283,
%U 1303,1319,1483,1499,1553,1609,1627,1657,1693,1721,1733,1823,1913,1933,1951,2003,2027,2039,2129,2161,2203
%N a(1) = 2, then a(n) is the least prime p > a(n - 1) such that p + a(n-1) and p - a(n-1) have the same number of prime factors counted with multiplicity.
%H Robert Israel, <a href="/A363513/b363513.txt">Table of n, a(n) for n = 1..10000</a>
%F A001222(a(n) - a(n-1)) = A001222(a(n) + a(n-1)).
%e a(2) = 5 because A001222(5-2) = A001222(5+2) = 1.
%e a(3) = 13 because A001222(13-5) = A001222(13+5) = 3.
%p R:= 2: r:= 2:
%p for i from 1 to 100 do
%p p:= nextprime(r);
%p while numtheory:-bigomega(r+p) <> numtheory:-bigomega(p-r) do
%p p:= nextprime(p)
%p od;
%p R:= R,p; r:= p;
%p od:
%p R;
%t s = {p = 2}; Do[q = NextPrime[p]; While[PrimeOmega[p + q]
%t != PrimeOmega[q - p], q = NextPrime[q]]; AppendTo[s, p = q], {200}]; s
%Y Cf. A001222, A361611.
%K nonn
%O 1,1
%A _Zak Seidov_ and _Robert Israel_, Jun 07 2023