login
A325826
a(n) is the largest k <= sigma(n)-n such that k and (2n-sigma(n)) [= A033879(n)] are relatively prime.
8
0, 1, 1, 3, 1, 1, 1, 7, 4, 7, 1, 15, 1, 9, 7, 15, 1, 20, 1, 21, 11, 13, 1, 35, 6, 13, 13, 1, 1, 41, 1, 31, 13, 19, 13, 55, 1, 21, 17, 49, 1, 53, 1, 39, 31, 23, 1, 75, 8, 43, 19, 43, 1, 65, 17, 63, 23, 31, 1, 107, 1, 33, 41, 63, 19, 77, 1, 57, 25, 73, 1, 122, 1, 39, 49, 61, 19, 89, 1, 105, 40, 43, 1, 139, 23, 43, 31, 91, 1, 143, 19, 75
OFFSET
1,4
FORMULA
a(n) = A325818(n) - n = A001065(n) - A325817(n) = A325976(n) - A033879(n).
a(A000040(n)) = a(A000396(n)) = 1.
a(n) >= A325969(n).
gcd(a(n), A325976(n)) = 1.
PROG
(PARI) A325826(n) = { my(s=sigma(n)); forstep(k=s-n, 0, -1, if(1==gcd((n+n-sigma(n)), k), return(k))); };
(PARI)
A325818(n) = { my(s=sigma(n)); for(i=0, s, if(1==gcd(n-i, n-(s-i)), return(s-i))); };
A325826(n) = (A325818(n) - n);
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 29 2019
STATUS
approved