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.

A107317 Semiprimes of the form 2*(m^2 + m + 1) (implying that m^2 + m + 1 is a prime).

Original entry on oeis.org

6, 14, 26, 62, 86, 146, 314, 422, 482, 614, 842, 926, 1202, 1514, 2246, 2966, 3446, 5102, 5942, 6614, 7082, 7814, 8846, 9662, 10226, 11402, 12014, 12326, 12962, 16022, 16382, 19802, 20606, 22262, 24422, 24866, 27614, 28562, 34586, 38366, 40046
Offset: 1

Views

Author

Giovanni Teofilatto, May 21 2005

Keywords

Comments

Twice A002383.
Also semiprimes n such that 2*n - 3 is a square. - Giovanni Teofilatto, Dec 29 2005. This coincidence was noticed by Andrew S. Plewe. Proof that this is the same sequence: If X is n^2+(n+1)^2+1, then 2X-3 is 4n^2+4n+1 = (2n+1)^2. And if 2X-3 is a square, then since it's odd, 2X-3 = (2n+1)^2 and X = n^2+(n+1)^2+1. - Don Reble, Apr 18 2007

Examples

			a(1)=6 because 1^2 + 2^2 + 1 = 6 = 2*3;
a(2)=14 because 2^2 + 3^2 + 1 = 14 = 2*7;
a(3)=26 because 3^2 + 4^2 + 1 = 26 = 13*2.
		

Crossrefs

Programs

  • Mathematica
    2(#^2 + # + 1) & /@ Select[ Range[144], PrimeQ[ #^2 + # + 1] &] (* Robert G. Wilson v, May 28 2005 *)
    fQ[n_] := Plus @@ Last /@ FactorInteger@n == 2 && IntegerQ@Sqrt[2n - 3]; Select[ Range@43513, fQ[ # ] &] (* Robert G. Wilson v *)
  • PARI
    for(n=2,100000,if(bigomega(n)==2&&issquare(2*n-3),print1(n,","))) /* Lambert Herrgesell */

Formula

a(n) = 2*A002383(n).
a(n) = 2*(A002384(n)^2+A002384(n)+1).

Extensions

Edited by Robert G. Wilson v, May 28 2005
Re-edited by N. J. A. Sloane, Apr 18 2007