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.

A139668 Primes of the form x^2 + 1848*y^2.

This page as a plain text file.
%I A139668 #38 Sep 08 2022 08:45:33
%S A139668 1873,2017,2137,2377,2473,2689,3217,3529,3697,4057,4657,5569,6073,
%T A139668 6337,7177,7393,7417,7561,7681,7753,8017,8089,8233,8353,8737,8761,
%U A139668 9241,9601,9769,11113,11257,11617,12049,12433,12457,12721,13297,13633,13729,14281,15073,15313,16417,16633,16657,16921,16993,17257,17977,18313,18481,19009,19273,19441,20113
%N A139668 Primes of the form x^2 + 1848*y^2.
%C A139668 Discriminant = -7392.
%C A139668 The primes are congruent to {1, 25, 169, 289, 361, 529, 625, 697, 793, 841, 961, 1345, 1369, 1633, 1681} (mod 1848).
%C A139668 More than the usual number of terms are shown in order to display the difference from A244019. - _N. J. A. Sloane_, Jun 19 2014
%H A139668 Vincenzo Librandi and Ray Chandler, <a href="/A139668/b139668.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from Vincenzo Librandi).
%H A139668 William C. Jagy and Irving Kaplansky, <a href="/A244019/a244019.pdf">Positive definite binary quadratic forms that represent the same primes</a> [Cached copy]
%H A139668 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)
%p A139668 fd:=proc(a,b,c,M) local dd,xlim,ylim,x,y,t1,t2,t3,t4,i;
%p A139668 dd:=4*a*c-b^2;
%p A139668 if dd<=0 then error "Form should be positive definite."; break; fi;
%p A139668 t1:={};
%p A139668 xlim:=ceil( sqrt(M/a)*(1+abs(b)/sqrt(dd)));
%p A139668 ylim:=ceil( 2*sqrt(a*M/dd));
%p A139668 for x from 0 to xlim do
%p A139668 for y from -ylim to ylim do
%p A139668 t2 := a*x^2+b*x*y+c*y^2;
%p A139668 if t2 <= M then t1:={op(t1),t2}; fi; od: od:
%p A139668 t3:=sort(convert(t1,list));
%p A139668 t4:=[];
%p A139668 for i from 1 to nops(t3) do
%p A139668    if isprime(t3[i]) then t4:=[op(t4),t3[i]]; fi; od:
%p A139668 [[seq(t3[i],i=1..nops(t3))], [seq(t4[i],i=1..nops(t4))]];
%p A139668 end;
%p A139668 fd(1,0,1848,50000); # _N. J. A. Sloane_, Jun 19 2014
%t A139668 QuadPrimes2[1, 0, 1848, 10000] (* see A106856 *)
%o A139668 (Magma) [ p: p in PrimesUpTo(15000) | p mod 1848 in {1, 25, 169, 289, 361, 529, 625, 697, 793, 841, 961, 1345, 1369, 1633, 1681}]; // _Vincenzo Librandi_, Jul 29 2012
%o A139668 (Magma) k:=1848; [p: p in PrimesUpTo(21000) | NormEquation(k, p) eq true]; // _Bruno Berselli_, Jun 01 2016
%Y A139668 Cf. A244019 (a different sequence which agrees for the first 43 terms), A106856.
%K A139668 nonn,easy
%O A139668 1,1
%A A139668 _T. D. Noe_, Apr 29 2008