login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A325817 a(n) is the least k >= 0 such that n-k and n-(sigma(n)-k) are relatively prime. 11
0, 0, 0, 0, 0, 5, 0, 0, 0, 1, 0, 1, 0, 1, 2, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 27, 0, 1, 0, 0, 2, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 0, 1, 0, 0, 2, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 2, 1, 0, 1, 2, 1, 0, 1, 2, 5, 0, 0, 2, 0, 0, 1, 0, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,6

COMMENTS

a(n) is the least k >= 0 such that -n + k and (n-sigma(n))+k are coprime.

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..65537

Index entries for sequences related to sigma(n)

FORMULA

a(n) = A000203(n) - A325818(n) = A001065(n) - A325826(n) = n - A325976(n).

For all n:

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

a(n) <= n-1.

a(n) <= A325965(n).

a(n) <= A325967(n).

EXAMPLE

For n=15, gcd(15-0, 15-(24-0)) = 3, gcd(15-1, 15-(24-1)) = 2 and gcd(15-2, 15-(24-2)) = 1, thus a(15) = 2.

PROG

(PARI) A325817(n) = { my(s=sigma(n)); for(k=0, s, if(1==gcd(-n + k, (n-s)+k), return(k))); };

(PARI) A325817(n) = { my(s=sigma(n)); for(i=0, s, if(1==gcd(n-i, n-(s-i)), return(i))); };

CROSSREFS

Cf. A000203, A000396, A001065, A009194, A014567 (positions of zeros), A324213, A325818, A325826, A325962, A325965, A325967, A325976.

Sequence in context: A106222 A090750 A324656 * A325967 A229656 A216722

Adjacent sequences:  A325814 A325815 A325816 * A325818 A325819 A325820

KEYWORD

nonn

AUTHOR

Antti Karttunen, May 29 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 29 08:46 EDT 2021. Contains 346340 sequences. (Running on oeis4.)