login
A325965
a(n) is the least k >= A020639(n) such that n-k and n-(sigma(n)-k) are relatively prime.
8
1, 2, 4, 2, 6, 5, 8, 2, 3, 3, 12, 3, 14, 3, 4, 2, 18, 2, 20, 3, 4, 3, 24, 5, 5, 3, 4, 27, 30, 5, 32, 2, 4, 3, 6, 2, 38, 3, 4, 3, 42, 5, 44, 3, 4, 3, 48, 3, 7, 2, 4, 3, 54, 5, 6, 3, 4, 3, 60, 5, 62, 3, 4, 2, 6, 5, 68, 5, 4, 3, 72, 2, 74, 3, 4, 3, 8, 5, 80, 3, 3, 3, 84, 3, 6, 3, 4, 3, 90, 5, 8, 3, 4, 3, 6, 5, 98, 2, 4, 2
OFFSET
1,2
FORMULA
a(n) = A000203(n) - A325966(n).
For all n:
a(A000396(n)) = A000396(n)-1.
a(n) >= A325817(n).
PROG
(PARI)
A020639(n) = if(1==n, n, factor(n)[1, 1]);
A325965(n) = { my(s=sigma(n)); for(i=A020639(n), s, if(1==gcd(n-i, n-(s-i)), return(i))); };
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 29 2019
STATUS
approved