login
A325971
a(n) is the least k >= A007947(n) such that -n + k and (n-sigma(n))+k are relatively prime.
4
1, 2, 4, 2, 6, 7, 8, 2, 3, 11, 12, 7, 14, 15, 16, 2, 18, 7, 20, 11, 22, 23, 24, 7, 5, 27, 4, 27, 30, 31, 32, 2, 34, 35, 36, 6, 38, 39, 40, 11, 42, 43, 44, 23, 16, 47, 48, 7, 7, 10, 52, 27, 54, 7, 56, 15, 58, 59, 60, 31, 62, 63, 22, 2, 66, 67, 68, 35, 70, 71, 72, 7, 74, 75, 16, 39, 78, 79, 80, 11, 3, 83, 84, 43, 86, 87, 88, 23, 90, 31
OFFSET
1,2
COMMENTS
a(n) is the least k >= A007947(n) such that n-k and n-(sigma(n)-k) are relatively prime.
FORMULA
a(n) = A000203(n) - A325972(n).
a(n) = n - A325970(n).
PROG
(PARI)
A007947(n) = factorback(factorint(n)[, 1]); \\ From A007947
A325971(n) = { my(s=sigma(n)); for(i=A007947(n), s, if(1==gcd(n-i, n-(s-i)), return(i))); (0); };
A325971(n) = { my(s=sigma(n)); for(k=A007947(n), s, if(1==gcd(-n + k, (n-sigma(n))+k), return(k))); };
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 31 2019
STATUS
approved