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.
%I A377319 #14 Dec 03 2024 23:33:13 %S A377319 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, %T A377319 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, %U A377319 1,4,4,4,3,6,4,9,6,2,5,5,2,8,1,3,3,2,3 %N A377319 a(n) is the smallest positive integer k such that n + k and n - k have the same number of divisors. %C A377319 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 A377319 Felix Huber, <a href="/A377319/b377319.txt">Table of n, a(n) for n = 4..10000</a> %F A377319 1 <= a(n) <= A082467(n). %e A377319 a(8) = 2 because 10 and 6 have both four divisors. 9 and 7 have a different number of divisors. %p A377319 A377319:=proc(n) %p A377319 local k; %p A377319 for k to n-1 do %p A377319 if NumberTheory:-tau(n+k)=NumberTheory:-tau(n-k) then %p A377319 return k %p A377319 fi %p A377319 od; %p A377319 end proc; %p A377319 seq(A377319(n),n=4..90); %t A377319 A377319[n_] := Module[{k = 0}, While[DivisorSigma[0, ++k + n] != DivisorSigma[0, n - k]]; k]; %t A377319 Array[A377319, 100, 4] (* _Paolo Xausa_, Dec 03 2024 *) %o A377319 (PARI) a(n) = my(k=1); while (numdiv(n+k) != numdiv(n-k), k++); k; \\ _Michel Marcus_, Nov 17 2024 %Y A377319 Cf. A000005, A067888 , A082467, A171937, A377320, A377321. %K A377319 nonn %O A377319 4,2 %A A377319 _Felix Huber_, Nov 17 2024