OFFSET
1,1
COMMENTS
A prime p can be expressed as either the sum of two squares or the sum of two squares - 1, p = X^2 + Y^2 or p = X^2 + Y^2 - 1, if and only if p is of the form 2*(m^2)+1 where m is either 1 or a multiple of 3.
Conjecture: 2^(a(n)-1) - 3 is not prime. - Vincenzo Librandi, Feb 04 2013.
Primes in A058331. - Vincenzo Librandi, Apr 10 2015
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..5000
EXAMPLE
19 = 2^2 + 4^2 - 1 = 2*(3^2)+1
73 = 5^2 + 7^2 - 1 = 2*(6^2)+1
163= 8^2 + 10^2 -1 = 2*(9^2)+1
883= 10^2+ 28^2 -1 = 2*(21^2)+1
MATHEMATICA
Select[Table[2n^2+1, {n, 0, 900}], PrimeQ] (* Vincenzo Librandi, Dec 02 2011 *)
PROG
(Magma)[a: n in [0..400] | IsPrime(a) where a is 2*n^2+1]; // Vincenzo Librandi, Dec 02 2011
(PARI) is(n)=isprime(2*n^2+1) \\ Charles R Greathouse IV, Jan 05 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Kurmang. Aziz. Rashid, Dec 20 2003
EXTENSIONS
Extended by Ray Chandler, Dec 21 2003
STATUS
approved