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 #12 Dec 03 2024 12:26:46
%S 1,2,1,2,1,2,1,1,1,1,3,2,2,3,1,1,2,1,2,1,1,1,1,1,1,2,1,3,4,4,1,1,2,1,
%T 2,1,3,3,1,3,3,1,2,1,1,1,2,1,2,1,2,1,1,1,4,3,1,4,6,3,1,3,3,2,2,2,2,3,
%U 1,1,2,1,1,3,2,3,1,1,1,3,2,3,1,1,3,2,2
%N a(n) is the smallest positive integer k such that n + k and n - k have the same number of distinct prime factors.
%C If the strong Goldbach conjecture is true, that every even number >= 8 is the sum of two distinct primes, then a positive integer k <= A082467(n) exists for n >= 4.
%H Felix Huber, <a href="/A377321/b377321.txt">Table of n, a(n) for n = 4..10000</a>
%F 1 <= a(n) <= A082467(n).
%e a(7) = 2 because 9 and 5 have both one distinct prime factor. 8 and 6 have a different number of distinct prime factors.
%p A377321:=proc(n)
%p local k;
%p for k to n-1 do
%p if NumberTheory:-Omega(n+k,'distinct')=NumberTheory:-Omega(n-k,'distinct') then
%p return k
%p fi
%p od;
%p end proc;
%p seq(A377321(n),n=4..90);
%t A377321[n_] := Module[{k = 0}, While[PrimeNu[++k + n] != PrimeNu[n - k]]; k];
%t Array[A377321, 100, 4] (* _Paolo Xausa_, Dec 02 2024 *)
%o (PARI) a(n) = my(k=1); while (omega(n+k) != omega(n-k), k++); k; \\ _Michel Marcus_, Nov 17 2024
%Y Cf. A001221, A082467, A188348, A377319, A377320.
%K nonn,new
%O 4,2
%A _Felix Huber_, Nov 17 2024