login
Record differences between the numbers n such that 4*n^2 + 1 is prime.
2

%I #6 Aug 06 2012 19:48:16

%S 1,2,5,7,8,10,17,20,23,44,50,56,65,76,106,144,165,173

%N Record differences between the numbers n such that 4*n^2 + 1 is prime.

%e a(1) = 1 because 4*1^2 + 1 = 5 and 4*2^2 + 1 = 17 are primes.

%e a(2) = 2 because 4*3^2 + 1 = 37 is prime, 4*4^2 + 1 = 65 is composite, and 4*5^2 + 1 = 101 is prime.

%e a(3) = 5 because 4*13^2 + 1 is prime, 4*n^2 + 1 is composite for n = 14..17, and 4*18^2 + 1 is prime.

%t n = 1; last = 1; t = {1}; While[Length[t] < 15, n++; p = 1 + 4*n^2; If[PrimeQ[p], If[n - last > t[[-1]], AppendTo[t, n - last]]; last = n]]; t

%Y Cf. A121326 (primes of the form 1+4*n^2), A001912 (values of n).

%Y Cf. A214517 (differences), A214519 (where record differences occur).

%K nonn,hard,more

%O 1,2

%A _T. D. Noe_, Aug 06 2012