A379014 Least number k such that prime(n) + prime(k) is a multiple of n, or -1 if no such number exists.
1, 2, 4, 3, 8, 3, 5, 3, 6, 5, 1, 5, 5, 6, 6, 5, 14, 5, 15, 10, 5, 11, 26, 4, 2, 2, 3, 3, 4, 4, 17, 10, 18, 11, 18, 10, 34, 27, 19, 19, 19, 10, 19, 20, 21, 11, 20, 7, 19, 20, 21, 21, 111, 8, 21, 7, 21, 8, 65, 8, 23, 7, 20, 21, 68, 6, 20, 2, 19, 20, 1, 21, 20, 20
Offset: 1
Keywords
Programs
-
Mathematica
a[n_]:=Module[{k=1},While[!Divisible[Prime[n]+Prime[k],n], k++]; k]; Array[a,74] (* Stefano Spezia, Dec 13 2024 *)
-
PARI
a(n) = my(k=1, p=prime(n)); while ((p+prime(k)) % n, k++); k; \\ Michel Marcus, Dec 13 2024
Comments