cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A162652 Primes p such that there are positive integers m and n and a prime q such that p = m^2+m-q = n^2+n+q.

Original entry on oeis.org

7, 13, 31, 43, 73, 211, 241, 421, 463, 1123, 1723, 2551, 2971, 4831, 5701, 6163, 8011, 8191, 9901, 11131, 12433, 14281, 17293, 19183, 20023, 23563, 24181, 28393, 30103, 31153, 35911, 37831, 43891, 46441, 53593, 60271, 77563, 83233, 86143, 95791
Offset: 1

Views

Author

Daniel Tisdale, Jul 08 2009

Keywords

Comments

To test if a prime p is a member, p = n^2+n+q gives a finite list of possible pairs (n,q), and, for each value of q, m^2+m = p+q determines a putative value of m. - N. J. A. Sloane, Jul 17 2009
Also, primes of the form (p^2+3)/4 with p odd prime. - Zak Seidov, May 10 2014

Examples

			7 = 1^2+1+5 = 3^2+3-5.
		

Crossrefs

Cf. A163418. - R. J. Mathar, Feb 05 2010

Programs

  • Maple
    isA002378 := proc(n) if n >= 0 then if issqr(4*n+1) then RETURN(type( sqrt(4*n+1),'odd')) ; else false; fi; else false; fi; end: # primes p such there is a prime q
  • Mathematica
    sol[p_] := m^2 + m - p /. Solve[m>0 && n>0 && 2p == m + m^2 + n + n^2, {m, n}, Integers];
    Reap[For[p = 2, p < 10^6, p = NextPrime[p], qsel = Select[sol[p], PrimeQ]; If[qsel != {}, Print[p]; Sow[p]]]][[2, 1]] (* Jean-François Alcover, Mar 25 2020 *)

Extensions

Definition revised by N. J. A. Sloane, Jul 17 2009
More terms from R. J. Mathar, Jul 17 2009
Extended beyond a(31) by R. J. Mathar, Feb 05 2010