login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A325962 a(1) = 1; for n > 1, a(n) is the largest k <= 1+A046666(n) such that n-k and n-(sigma(n)-k) are relatively prime, or -1 if no such nonnegative k exists. 7

%I #13 Jun 02 2019 00:51:51

%S 1,1,0,3,0,5,0,7,7,9,0,11,0,13,10,15,0,17,0,19,18,21,0,23,21,25,24,27,

%T 0,29,0,31,28,33,30,35,0,37,36,39,0,41,0,43,40,45,0,47,43,49,44,51,0,

%U 53,50,55,54,57,0,59,0,61,60,63,60,65,0,67,64,69,0,71,0,73,72,75,70,77,0,79,79,81,0,83,80,85,82,87,0,89,82

%N a(1) = 1; for n > 1, a(n) is the largest k <= 1+A046666(n) such that n-k and n-(sigma(n)-k) are relatively prime, or -1 if no such nonnegative k exists.

%C a(n) is equal to A325817(n) only with odd primes and the even terms of A000396. a(n) = -1 only on odd perfect numbers, if such numbers exist. Otherwise a(n) = 2n - A325961(n).

%H Antti Karttunen, <a href="/A325962/b325962.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 For all n, a(A065091(n)) = 0.

%o (PARI)

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

%o A325962(n) = { my(s=sigma(n)); forstep(i=1+n-A020639(n), 0, -1, if(1==gcd(n-i, n-(s-i)), return(i))); (-1); };

%Y Cf. A000203, A000396, A020639, A046666, A065091, A324213, A325817, A325818, A325960, A325961, A325965, A325966.

%K nonn

%O 1,4

%A _Antti Karttunen_, May 29 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 4 00:07 EDT 2024. Contains 373986 sequences. (Running on oeis4.)