OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..1589
MATHEMATICA
a[n_] := Module[{k = 1, s = n}, While[SquareFreeQ[s], k++; s += n^k]; s]; Array[a, 100] (* Amiram Eldar, Dec 26 2020 *)
PROG
(PARI) a(n) = my(k=1, s); while (issquarefree(s=sum(i=1, k, n^i)), k++); s; \\ Michel Marcus, Dec 26 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Oct 23 2006
STATUS
approved