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.

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.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 29 2019

Keywords

Comments

By definition, if n is neither an odd prime nor an odd perfect number, then a(n) >= (A020639(n)-1).

Crossrefs

Cf. A006005 (positions of zeros, provided no odd perfect numbers exist).

Programs

  • 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); };

Formula

a(n) = (A325961(n) - A325962(n)) / 2, assuming no odd perfect numbers exist.
a(2n) = 1.