|
|
A252669
|
|
a(n) is the smallest integer k such that n*k mod (n+k) = 1, or -1 if no such k exists.
|
|
0
|
|
|
1, 3, 2, 13, 8, 31, 3, 5, 32, 91, 50, 17, 4, 183, 98, 241, 12, 7, 162, 381, 5, 75, 30, 553, 288, 651, 46, 129, 392, 23, 6, 9, 76, 55, 578, 1261, 100, 47, 722, 1561, 17, 311, 7, 105, 968, 27, 18, 413, 1152, 11, 1250, 489, 228, 2863, 34, 3081, 8, 615, 1682, 217, 1800, 707
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
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 str(res)+', ',
(PARI) a(n) = k=1; while ((n*k) % (n+k) != 1, k++); k; \\ Michel Marcus, Jan 08 2015
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|