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 A325960 #10 Jun 02 2019 00:51:34 %S A325960 0,1,0,1,0,1,0,1,2,1,0,1,0,1,5,1,0,1,0,1,3,1,0,1,4,1,3,1,0,1,0,1,5,1, %T A325960 5,1,0,1,3,1,0,1,0,1,5,1,0,1,6,1,7,1,0,1,5,1,3,1,0,1,0,1,3,1,5,1,0,1, %U A325960 5,1,0,1,0,1,3,1,7,1,0,1,2,1,0,1,5,1,5,1,0,1,9,1,3,1,9,1,0,1,5,1,0,1,0,1,5 %N A325960 a(n) is k-n for the least k >= n+(A020639(n)-1) such that n-k and n-(sigma(n)-k) are relatively prime, or 0 if no such k <= sigma(n) exists. %C A325960 By definition, if n is neither an odd prime nor an odd perfect number, then a(n) >= (A020639(n)-1). %H A325960 Antti Karttunen, <a href="/A325960/b325960.txt">Table of n, a(n) for n = 1..65537</a> %H A325960 <a href="/index/Si#SIGMAN">Index entries for sequences related to sigma(n)</a> %F A325960 a(n) = (A325961(n) - A325962(n)) / 2, assuming no odd perfect numbers exist. %F A325960 a(2n) = 1. %o A325960 (PARI) %o A325960 A020639(n) = if(1==n, n, factor(n)[1, 1]); %o A325960 A325960(n) = { my(s=sigma(n)); for(i=(-1)+n+A020639(n), s, if(1==gcd(n-i, n-(s-i)), return(i-n))); (0); }; %Y A325960 Cf. A000203, A000396, A020639, A324213, A325817, A325818, A325826, A325961, A325962, A325965, A325966, A325970. %Y A325960 Cf. A006005 (positions of zeros, provided no odd perfect numbers exist). %K A325960 nonn %O A325960 1,9 %A A325960 _Antti Karttunen_, May 29 2019