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.

A377320 a(n) is the smallest positive integer k such that n + k and n - k have the same number of prime factors.

This page as a plain text file.
%I A377320 #15 Dec 02 2024 11:03:35
%S A377320 1,1,1,3,2,2,2,6,1,5,3,2,3,6,1,1,3,2,9,2,2,5,3,4,6,1,1,11,6,4,1,6,2,2,
%T A377320 2,2,3,8,1,1,3,2,4,3,4,12,1,1,3,2,3,1,1,3,2,7,1,4,7,4,3,6,5,1,2,1,3,5,
%U A377320 1,3,4,4,3,1,4,13,6,2,5,15,2,7,1,3,3,1,3
%N A377320 a(n) is the smallest positive integer k such that n + k and n - k have the same number of prime factors.
%C A377320 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 A377320 Felix Huber, <a href="/A377320/b377320.txt">Table of n, a(n) for n = 4..10000</a>
%F A377320 1 <= a(n) <= A082467(n).
%e A377320 a(7) = 3 because 10 and 4 have both two prime factors. 8 and 6 or 9 and 7 respectively have a different number of prime factors.
%p A377320 A377320:=proc(n)
%p A377320    local k;
%p A377320    for k to n-1 do
%p A377320       if NumberTheory:-Omega(n+k)=NumberTheory:-Omega(n-k) then
%p A377320          return k
%p A377320       fi
%p A377320    od;
%p A377320 end proc;
%p A377320 seq(A377320(n),n=4..90);
%t A377320 A377320[n_] := Module[{k = 0}, While[PrimeOmega[++k + n] != PrimeOmega[n - k]]; k];
%t A377320 Array[A377320, 100, 4] (* _Paolo Xausa_, Dec 02 2024 *)
%o A377320 (PARI) a(n) = my(k=1); while (bigomega(n+k) != bigomega(n-k), k++); k; \\ _Michel Marcus_, Nov 17 2024
%Y A377320 Cf. A001222, A082467, A178139, A377319, A377321.
%K A377320 nonn
%O A377320 4,4
%A A377320 _Felix Huber_, Nov 17 2024