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.

A106858 Primes of the form 2x^2+xy+2y^2 with x and y nonnegative.

This page as a plain text file.
%I A106858 #28 Oct 18 2014 12:58:15
%S A106858 2,5,23,83,107,137,173,257,293,347,353,467,503,617,647,653,743,797,
%T A106858 857,953,983,1223,1277,1283,1307,1427,1487,1493,1523,1553,1637,1787,
%U A106858 1877,1913,1997,2003,2027,2213,2237,2243,2393,2423,2447,2657,2663
%N A106858 Primes of the form 2x^2+xy+2y^2 with x and y nonnegative.
%C A106858 Discriminant=-15.
%H A106858 Vincenzo Librandi, N. J. A. Sloane and Ray Chandler, <a href="/A106858/b106858.txt">Table of n, a(n) for n = 1..10000</a> [First 1000 terms from Vincenzo Librandi, next 1000 terms from N. J. A. Sloane]
%H A106858 N. J. A. Sloane et al., <a href="https://oeis.org/wiki/Binary_Quadratic_Forms_and_OEIS">Binary Quadratic Forms and OEIS</a> (Index to related sequences, programs, references)
%t A106858 QuadPrimes2[a_, b_, c_, lmt_] := Module[{p, d, lst = {}, xMax, yMax}, d = b^2 - 4a*c; If[a > 0 && c > 0 && d < 0, xMax = Sqrt[lmt/a]*(1+Abs[b]/Floor[Sqrt[-d]])]; Do[ If[ 4c*lmt + d*x^2 >= 0, yMax = ((-b)*x + Sqrt[4c*lmt + d*x^2])/(2c), yMax = 0 ]; Do[p = a*x^2 + b*x*y + c*y^2; If[ PrimeQ[ p]  && !MemberQ[ lst, p], AppendTo[ lst, p]], {y, 0, yMax}], {x, 0, xMax}]; Sort[ lst]];
%t A106858 t2 = QuadPrimes2[2, 1, 2, 350000];
%t A106858 Length[t2]
%t A106858 t2[[Length[t2]]]
%t A106858 For[n=1, n <= 2000, n++, Print[n, " ", t2[[n]]]] (* From _N. J. A. Sloane_, Jun 17 2014 *)
%Y A106858 Cf. A028955, A106859, A243173, A033212.
%K A106858 nonn,easy
%O A106858 1,1
%A A106858 _T. D. Noe_, May 09 2005
%E A106858 Replace Mma program by a correct program, recomputed and extended b-file. - _N. J. A. Sloane_, Jun 17 2014