login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) is the least k >= A020639(n) such that n-k and n-(sigma(n)-k) are relatively prime.
8

%I #8 Jun 02 2019 00:52:00

%S 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,

%T 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,

%U 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

%N a(n) is the least k >= A020639(n) such that n-k and n-(sigma(n)-k) are relatively prime.

%H Antti Karttunen, <a href="/A325965/b325965.txt">Table of n, a(n) for n = 1..20000</a>

%H <a href="/index/Si#SIGMAN">Index entries for sequences related to sigma(n)</a>

%F a(n) = A000203(n) - A325966(n).

%F For all n:

%F a(A000396(n)) = A000396(n)-1.

%F a(n) >= A325817(n).

%o (PARI)

%o A020639(n) = if(1==n, n, factor(n)[1, 1]);

%o A325965(n) = { my(s=sigma(n)); for(i=A020639(n), s, if(1==gcd(n-i, n-(s-i)), return(i))); };

%Y Cf. A000203, A000396, A020639, A325817, A325966.

%K nonn

%O 1,2

%A _Antti Karttunen_, May 29 2019