login
Least k such that 4*n*k+1 is a prime.
0

%I #8 Sep 28 2013 01:34:30

%S 1,2,1,1,2,3,1,3,1,1,2,2,1,2,1,3,2,1,3,3,4,1,3,1,1,3,1,1,2,2,3,2,3,1,

%T 2,3,1,3,1,4,5,2,1,2,1,7,5,1,1,2,2,6,5,2,3,2,1,1,3,1,3,6,3,1,2,5,1,5,

%U 1,1,2,2,1,2,2,4,2,1,1,2,4,7,3,1,3,3,1,1,3,5,3,9,1,3,2,2,1,8,1,1,2,1,3,3,1

%N Least k such that 4*n*k+1 is a prime.

%e a(5)=2 because for n=5: 4*5*2+1=41 is a prime.

%o (PARI) a(n) = my(k = 0); while (! isprime(4*n*k+1), k++); k; \\ _Michel Marcus_, Sep 28 2013

%Y Cf. A016014.

%K nonn

%O 1,2

%A _Felice Russo_

%E More terms from _Erich Friedman_