login
A035092
Smallest k such that (n^2)*k + 1 is prime.
10
1, 1, 2, 1, 4, 1, 4, 3, 2, 1, 6, 3, 4, 1, 8, 1, 12, 4, 30, 1, 2, 3, 24, 1, 18, 1, 2, 4, 12, 2, 16, 12, 2, 3, 6, 1, 4, 13, 6, 1, 10, 2, 12, 6, 2, 6, 4, 8, 6, 9, 6, 9, 28, 1, 4, 1, 10, 3, 6, 4, 46, 4, 4, 3, 4, 1, 4, 3, 22, 6, 10, 2, 4, 1, 2, 7, 22, 3, 6, 4, 6, 3, 10, 1, 4, 3, 2, 4, 6, 1, 10, 4, 2, 1
OFFSET
1,3
EXAMPLE
a(40) = 1 because in 1600k + 1 at k = 1, 1601 is the smallest prime;
a(61) = 46 because in the 46*46*k + 1 sequence the first prime appears at k = 46; it is 171167.
MATHEMATICA
Table[k = 1; While[! PrimeQ[k (n^2) + 1], k++]; k, {n, 94}] (* Michael De Vlieger, Dec 17 2016 *)
PROG
(PARI)
a(n)=k=1; while(!isprime(k*n^2+1), k++); k
vector(100, n, a(n)) \\ Derek Orr, Oct 01 2014
CROSSREFS
Analogous case is A034693. See also A005574 and A002496.
Sequence in context: A072721 A339792 A285711 * A160598 A107457 A112350
KEYWORD
nonn,easy
AUTHOR
STATUS
approved