login
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.
6
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, 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, 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
OFFSET
1,9
COMMENTS
By definition, if n is neither an odd prime nor an odd perfect number, then a(n) >= (A020639(n)-1).
FORMULA
a(n) = (A325961(n) - A325962(n)) / 2, assuming no odd perfect numbers exist.
a(2n) = 1.
PROG
(PARI)
A020639(n) = if(1==n, n, factor(n)[1, 1]);
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); };
CROSSREFS
Cf. A006005 (positions of zeros, provided no odd perfect numbers exist).
Sequence in context: A344649 A337620 A318515 * A116422 A130161 A115672
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 29 2019
STATUS
approved