OFFSET
1,2
FORMULA
a(a(n)) <= n.
MATHEMATICA
sik[n_]:=Module[{k=1}, While[Mod[n*k, n+k]!=1, k++]; k]; Array[sik, 70] (* Harvey P. Dale, Aug 15 2015 *)
PROG
(Python)
import math
for n in range(1, 333):
res=-1
for k in range(2**31-1):
if ((n*k) % (n+k) == 1):
res=k
break
print(res, end=', ')
(PARI) a(n) = k=1; while ((n*k) % (n+k) != 1, k++); k; \\ Michel Marcus, Jan 08 2015
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Alex Ratushnyak, Jan 02 2015
STATUS
approved