login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
Cf. A063427.
Sequence in context: A226062 A245610 A191705 * A131050 A219374 A084416
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Jan 02 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 19:06 EDT 2024. Contains 371962 sequences. (Running on oeis4.)