A219109 The smallest k such that prime(k) == -1 (mod n).
1, 2, 1, 2, 8, 3, 6, 4, 7, 8, 14, 5, 27, 6, 10, 11, 19, 7, 12, 8, 13, 14, 33, 9, 35, 27, 16, 23, 40, 10, 18, 11, 32, 19, 34, 20, 21, 12, 51, 22, 38, 13, 55, 14, 24, 33, 60, 15, 25, 35, 26, 27, 47, 16, 29, 39, 30, 40, 71, 17, 93, 18, 54, 31, 77, 32, 79, 19, 33, 34, 61, 20, 172, 21, 35, 36
Offset: 1
Keywords
Examples
For n = 11, we see that the 14th prime (43), modulo 11 is 10, or -1, so a(11) = 14.
Links
- Paolo P. Lava, Table of n, a(n) for n = 1..1000
Programs
-
PARI
a(n)=forstep(t=n-1,n^99,n,if(isprime(t),return(primepi(t)))) \\ Charles R Greathouse IV, Mar 17 2014
Comments