login
Primes of the form j^2 + (j+1)^2.
42

%I #105 Oct 06 2023 10:58:49

%S 5,13,41,61,113,181,313,421,613,761,1013,1201,1301,1741,1861,2113,

%T 2381,2521,3121,3613,4513,5101,7321,8581,9661,9941,10513,12641,13613,

%U 14281,14621,15313,16381,19013,19801,20201,21013,21841,23981,24421,26681

%N Primes of the form j^2 + (j+1)^2.

%C Also, primes of the form 4*k+1 which are the hypotenuse of one and only one right triangle with integral legs. - _Cino Hilliard_, Mar 16 2003

%C Centered square primes (i.e., prime terms of centered squares A001844). - _Lekraj Beedassy_, Jan 21 2005

%C Primes of the form 2*k*(k-1)+1. - _Juri-Stepan Gerasimov_, Apr 27 2010

%C Equivalently, primes of the form (m^2+1)/2 (take m=2*j+1). These primes a(n) have nontrivial solutions of x^2 == 1 (Modd a(n)) given by x=x(n)=A002731(n). For Modd n see a comment on A203571. See also A206549 for such solutions for primes of the form 4*k+1, given in A002144.

%C E.g., a(3)=41, A002731(3)=9, 9^2=81, floor(81/41)=1 (odd),

%C -81 = -2*41 + 1 == 1 (mod 41), hence 9^2 == 1 (Modd 41). - _Wolfdieter Lang_, Feb 24 2012

%C Also primes of the form 4*k+1 that are the smallest side length of one and only one integer Soddyian triangle (see A230812). - _Frank M Jackson_, Mar 13 2014

%C Also, primes of the form (m^2+1)/2. - _Zak Seidov_, May 01 2014

%C Note that ((2n+1)^2 + 1)/2 = n^2 + (n+1)^2. - _Thomas Ordowski_, May 25 2015

%C Primes p such that 2p-1 is a square. - _Thomas Ordowski_, Aug 27 2016

%C Primes in the main diagonal of A000027 when represented as an array read by antidiagonals. - _Clark Kimberling_, Mar 12 2023

%C The diophantine equation x^2 + … + (x + r)^2 = p may be rewritten to A*x^2 + B*x + C = p, where A = (r + 1), B = r*(r + 1), C = r*(r + 1)*(2*r + 1)/6. If gcd(A, B, C) > 1 no solution for a prime p exists. The gcd(A, B, C) = 1 holds only for r = 1, 2, 5 (gcd is the greatest common divisor). For r = 1 we have x^2 + (x + 1)^2 = p, thus for x from A027861 we calculate primes p from A027862. For r = 2 we have x^2 + (x + 1)^2 + (x + 2)^2 = p, thus for x from A027863 we calculate primes p from A027864. For r = 5 we have x^2 + … + (x + 5)^2 = p, thus for x from A027866 we calculate primes p from A027867. - _Ctibor O. Zizka_, Oct 04 2023

%D D. M. Burton, Elementary Number Theory, Allyn and Bacon Inc. Boston, MA, 1976, p. 271.

%D Morris Kline, Mathematical Thought from Ancient to Modern Times, 1972. pp. 275.

%H T. D. Noe and Zak Seidov, <a href="/A027862/b027862.txt">Table of n, a(n) for n = 1..10000</a>

%H Patrick De Geest, <a href="http://www.worldofnumbers.com/index.html">World!Of Numbers</a>

%H Daniel Shanks, <a href="https://doi.org/10.1215/ijm/1256059560">An analytic criterion for the existence of infinitely many primes of the form 1/2 * (n^2 + 1)</a>, Illinois Journal of Mathematics 8:3 (1964), p. 377-379.

%H W. Sierpiński, <a href="http://gdz.sub.uni-goettingen.de/dms/load/img/?PPN=GDZPPN002075016&amp;IDDOC=243194">Sur les nombres triangulaires qui sont sommes de deux nombres triangulaires</a>, Elem. Math., 17 (1962), pp. 63-65.

%H Panayiotis G. Tsangaris, <a href="http://ami.ektf.hu/uploads/papers/finalpdf/AAPASM_25_from39to53.pdf">A sieve for all primes of the form x^2 + (x+1)^2</a>, Acta Academiae Paedagogicae Agriensis, Sectio Mathematicae, 25 (1998), pp. 39-53.

%F a(n) = ((A002731(n)^2 - 1) / 2) + 1. - _Torlach Rush_, Mar 14 2014

%F a(n) = ((A002731(n)^2 + 1) / 2). - _Zak Seidov_, May 01 2014

%e 13 is in the sequence because it is prime and 13 = 2^2 + 3^2. - _Michael B. Porter_, Aug 27 2016

%t Select[Table[n^2+(n+1)^2,{n,200}],PrimeQ] (* _Harvey P. Dale_, Aug 22 2012 *)

%t Select[Total/@Partition[Range[200]^2,2,1],PrimeQ] (* _Harvey P. Dale_, Apr 20 2016 *)

%o (PARI) je=[]; for(n=1,500, if(isprime(n^2+(n+1)^2),je=concat(je,n^2+(n+1)^2))); je

%o (PARI) fermat(n) = { for(x=1,n, y=2*x*(x+1)+1; if(isprime(y),print1(y" ")) ) }

%o (Magma) [ a: n in [0..150] | IsPrime(a) where a is n^2+(n+1)^2 ]; // _Vincenzo Librandi_, Dec 18 2010

%Y Primes p such that A079887(p) = 1.

%Y Primes arising in A002731, A027861 gives n values, A091277 gives prime index.

%Y Subsequence of A002144.

%Y Cf. A001844, A027863, A027864, A027866, A027867, A203571, A230812.

%K nonn,easy,nice

%O 1,1

%A _Patrick De Geest_

%E More terms from _Cino Hilliard_, Mar 16 2003