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!)
A325970 a(n) is the largest k <= A066503(n) such that k and (2n-sigma(n)) [= A033879(n)] are relatively prime. 7
0, 0, -1, 2, -1, -1, -1, 6, 6, -1, -1, 5, -1, -1, -1, 14, -1, 11, -1, 9, -1, -1, -1, 17, 20, -1, 23, 1, -1, -1, -1, 30, -1, -1, -1, 30, -1, -1, -1, 29, -1, -1, -1, 21, 29, -1, -1, 41, 42, 40, -1, 25, -1, 47, -1, 41, -1, -1, -1, 29, -1, -1, 41, 62, -1, -1, -1, 33, -1, -1, -1, 65, -1, -1, 59, 37, -1, -1, -1, 69, 78 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
a(n) = n-k for the least k >= A007947(n) such that n-k and n-(sigma(n)-k) are relatively prime.
LINKS
FORMULA
a(n) = n - A325971(n).
For n >= 3, a(A005117(n)) = -1.
PROG
(PARI)
A007947(n) = factorback(factorint(n)[, 1]); \\ From A007947
A325970(n) = { my(s=sigma(n)); forstep(k=n-A007947(n), -oo, -1, if(1==gcd(k, n+n-sigma(n)), return(k))); };
\\ Or alternatively:
A325970(n) = { my(s=sigma(n)); for(i=A007947(n), s, if(1==gcd(n-i, n-(s-i)), return(n-i))); };
CROSSREFS
Sequence in context: A064992 A187783 A089759 * A347781 A088152 A049270
KEYWORD
sign
AUTHOR
Antti Karttunen, May 31 2019
STATUS
approved

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 April 25 12:33 EDT 2024. Contains 371969 sequences. (Running on oeis4.)