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!)
A079115 Least k such that n+k is squarefree and coprime to n. 2
1, 1, 2, 1, 1, 1, 3, 3, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 3, 5, 1, 3, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 3, 3, 1, 1, 4, 5, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 1, 3, 3, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 4, 3, 2, 1, 1, 1, 2, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
a(n) = A079114(n) - n.
LINKS
EXAMPLE
From Michael De Vlieger, Nov 23 2017: (Start)
First positions of values in a(n):
n a(n)
--------------
1 1
3 2
7 3
47 4
24 5
1679 6
120 7
843 8
2522 9
72471 10
840 11
64050 13
1674274 15
404580 17
2042040 19
(End)
MATHEMATICA
Table[Block[{k = 1}, While[Nand[SquareFreeQ[n + k], CoprimeQ[n, n + k]], k++]; k], {n, 105}] (* Michael De Vlieger, Nov 23 2017 *)
PROG
(PARI) A079115(n) = { my(k=1); while((!issquarefree(n+k))||(gcd(n, n+k)>1), k++); k; } \\ Antti Karttunen, Nov 23 2017
CROSSREFS
Sequence in context: A238016 A185812 A152798 * A072906 A239062 A341052
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Dec 25 2002
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 10:01 EDT 2024. Contains 371967 sequences. (Running on oeis4.)