login
A377319
a(n) is the smallest positive integer k such that n + k and n - k have the same number of divisors.
3
1, 2, 1, 1, 2, 1, 3, 3, 1, 6, 3, 2, 3, 6, 1, 1, 3, 2, 9, 5, 2, 6, 3, 3, 6, 12, 1, 4, 6, 4, 1, 5, 2, 2, 6, 2, 3, 1, 1, 8, 3, 2, 11, 3, 4, 7, 3, 1, 6, 2, 3, 1, 1, 4, 7, 9, 1, 4, 7, 4, 3, 6, 5, 2, 2, 2, 3, 6, 1, 4, 4, 4, 3, 6, 4, 9, 6, 2, 5, 5, 2, 8, 1, 3, 3, 2, 3
OFFSET
4,2
COMMENTS
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.
FORMULA
1 <= a(n) <= A082467(n).
EXAMPLE
a(8) = 2 because 10 and 6 have both four divisors. 9 and 7 have a different number of divisors.
MAPLE
A377319:=proc(n)
local k;
for k to n-1 do
if NumberTheory:-tau(n+k)=NumberTheory:-tau(n-k) then
return k
fi
od;
end proc;
seq(A377319(n), n=4..90);
MATHEMATICA
A377319[n_] := Module[{k = 0}, While[DivisorSigma[0, ++k + n] != DivisorSigma[0, n - k]]; k];
Array[A377319, 100, 4] (* Paolo Xausa, Dec 03 2024 *)
PROG
(PARI) a(n) = my(k=1); while (numdiv(n+k) != numdiv(n-k), k++); k; \\ Michel Marcus, Nov 17 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Huber, Nov 17 2024
STATUS
approved