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.

A325961 a(n) is the least k >= A061228(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

1, 3, 0, 5, 0, 7, 0, 9, 11, 11, 0, 13, 0, 15, 20, 17, 0, 19, 0, 21, 24, 23, 0, 25, 29, 27, 30, 29, 0, 31, 0, 33, 38, 35, 40, 37, 0, 39, 42, 41, 0, 43, 0, 45, 50, 47, 0, 49, 55, 51, 58, 53, 0, 55, 60, 57, 60, 59, 0, 61, 0, 63, 66, 65, 70, 67, 0, 69, 74, 71, 0, 73, 0, 75, 78, 77, 84, 79, 0, 81, 83, 83, 0, 85, 90, 87, 92, 89, 0, 91, 100
Offset: 1

Views

Author

Antti Karttunen, May 29 2019

Keywords

Comments

a(n) attains the value of A325818(n) only with n = 1, 2 and the even terms of A000396. Note that A000203(n) > ((n+A020639(n))-1) with composite n.

Crossrefs

Programs

  • PARI
    A020639(n) = if(1==n, n, factor(n)[1, 1]);
    A325961(n) = { my(s=sigma(n)); for(i=(-1)+n+A020639(n), s, if(1==gcd(n-i, n-(s-i)), return(i))); (0); };

Formula

a(n) = 0 if and only if n is either an odd prime or an odd perfect number, but if n is neither, then a(n) = 2n - A325962(n).