OFFSET
1,1
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
MATHEMATICA
a[1] = 2; a[n_] := a[n] = (m = n+1; While[ !(SquareFreeQ[m] && GCD[m, n] > 1), m++]; m); Table[a[n], {n, 1, 64}] (* Jean-François Alcover, Feb 15 2012 *)
PROG
(Haskell)
a071888 1 = 2
a071888 n = head [m | m <- dropWhile (<= n) a005117_list, gcd m n > 1]
-- Reinhard Zumkeller, Jun 10 2012
(PARI) a(n)=if(n<2, return(2)); my(m=n+1); while(gcd(m++, n)==1 || !issquarefree(m), ); m \\ Charles R Greathouse IV, May 29 2014
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
Reinhard Zumkeller, Jun 10 2002
STATUS
approved