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.

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

This page as a plain text file.
%I A325965 #8 Jun 02 2019 00:52:00
%S A325965 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 A325965 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 A325965 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 A325965 a(n) is the least k >= A020639(n) such that n-k and n-(sigma(n)-k) are relatively prime.
%H A325965 Antti Karttunen, <a href="/A325965/b325965.txt">Table of n, a(n) for n = 1..20000</a>
%H A325965 <a href="/index/Si#SIGMAN">Index entries for sequences related to sigma(n)</a>
%F A325965 a(n) = A000203(n) - A325966(n).
%F A325965 For all n:
%F A325965 a(A000396(n)) = A000396(n)-1.
%F A325965 a(n) >= A325817(n).
%o A325965 (PARI)
%o A325965 A020639(n) = if(1==n, n, factor(n)[1, 1]);
%o A325965 A325965(n) = { my(s=sigma(n)); for(i=A020639(n), s, if(1==gcd(n-i, n-(s-i)), return(i))); };
%Y A325965 Cf. A000203, A000396, A020639, A325817, A325966.
%K A325965 nonn
%O A325965 1,2
%A A325965 _Antti Karttunen_, May 29 2019