login
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
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