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.

A244175 Semiprimes s = p*q such that (p+q)^2 - s is prime.

Original entry on oeis.org

6, 14, 21, 26, 33, 35, 51, 69, 74, 87, 93, 111, 119, 122, 129, 143, 146, 161, 185, 203, 209, 215, 219, 278, 287, 299, 303, 305, 314, 321, 341, 371, 381, 395, 413, 437, 458, 482, 489, 515, 527, 533, 537, 545, 551, 591, 629, 671, 698, 707, 713, 717, 734, 737, 755
Offset: 1

Views

Author

Peter Luschny, Jun 21 2014

Keywords

Comments

All terms are squarefree, since primes p and q must be distinct. (Otherwise, we would have (p+q)^2 - s = (2p)^2 - p^2 = 3p^2, which could not be prime.) - Jon E. Schoenfield, Dec 16 2016

Examples

			The terms 6, 14, 21 and 581543 are in the sequence because:
2^2 + 2*3 + 3^2 = (2+3)^2 -  6 = 19 is prime.
2^2 + 2*7 + 7^2 = (2+7)^2 - 14 = 67 is prime.
3^2 + 3*7 + 7^2 = (3+7)^2 - 21 = 79 is prime.
677^2 + 677*859 + 859^2 = (677+859)^2 - 581543 = 1777753 is prime.
		

Crossrefs

Subsequence of A006881.
Cf. A244146.

Programs

  • Mathematica
    max = 1000; Reap[For[p=2, p <= Sqrt[max], p = NextPrime[p], For[q=NextPrime[p], p*q <= max, q=NextPrime[q], If[PrimeQ[(p+q)^2-p*q], Sow[p*q]]]]][[2, 1]] // Sort (* Jean-François Alcover, Dec 09 2014 *)
    Select[Select[Range[10^3], SquareFreeQ@ # && PrimeOmega@ # == 2 &],
    Function[s, PrimeQ[(#1 + #2)^2 - s] & @@ FactorInteger[s][[All, 1]]]] (* Michael De Vlieger, Dec 17 2016 *)