OFFSET
1,3
COMMENTS
a(n) = A079114(n) - n.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
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
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Dec 25 2002
STATUS
approved