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.

A084866 Primes that can be written in the form 2*p^2 + 3*q^2 with p and q prime.

Original entry on oeis.org

83, 173, 197, 269, 317, 389, 461, 557, 653, 701, 797, 941, 1091, 1109, 1181, 1229, 1637, 1709, 1949, 1997, 2069, 2141, 2309, 2531, 2549, 2621, 2789, 2861, 3221, 3389, 3461, 3581, 3821, 4157, 4229, 4349, 4493, 5051, 5261, 5381, 5501, 5693
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 10 2003

Keywords

Comments

Subsequence of A084864 and of A084865; A084863(a(n))>0.

Examples

			A000040(40) = 173 = 98 + 75 = 2*7^2 + 3*5^2 = 2*A000040(4)^2 + 3*A000040(3)^2, therefore 173 is a term.
		

Crossrefs

Programs

  • Maple
    N:= 10^4: # to get terms <= N
    P:= select(isprime, [2,seq(i,i=3..floor((N/2)^(1/2)))]):
    m:= nops(P):
    R:= {}:
    for p in P do
      for i from 2 to m while 3*P[i]^2 <= N - 2*p^2 do
        v:= 2*p^2 + 3*P[i]^2;
        if isprime(v) then R:= R union {v} fi
    od od:
    sort(convert(R,list)); # Robert Israel, Nov 05 2020
  • Mathematica
    nn = 10^4; (* to get terms <= nn *)
    P = Select[Join[{2}, Range[3, Floor[Sqrt[nn/2]]]], PrimeQ];
    m = Length[P];
    R = {};
    Do[For[i = 2, 3*P[[i]]^2 <= nn - 2*p^2, i++,
         v = 2*p^2 + 3*P[[i]]^2;
         If[PrimeQ[v], R = R ~Union~ {v}]],
    {p, P}];
    Sort[R] (* Jean-François Alcover, Dec 13 2021, after Robert Israel *)