login
Discriminants of quadratic number fields Q(sqrt -n) for n squarefree.
5

%I #18 Dec 17 2021 09:51:22

%S -4,-8,-3,-20,-24,-7,-40,-11,-52,-56,-15,-68,-19,-84,-88,-23,-104,

%T -116,-120,-31,-132,-136,-35,-148,-152,-39,-164,-168,-43,-184,-47,-51,

%U -212,-55,-228,-232,-59,-244,-248,-260,-264,-67,-276,-280,-71,-292,-296,-308,-312,-79,-328,-83,-340,-344,-87,-356

%N Discriminants of quadratic number fields Q(sqrt -n) for n squarefree.

%D David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989, p. 103.

%H T. D. Noe, <a href="/A033197/b033197.txt">Table of n, a(n) for n = 1..10000</a>

%F For n squarefree and negative, a(n) = n if n == 1 (mod 4), otherwise a(n) = 4n.

%t max = 56; j = 1; Do[ If[ SquareFreeQ[n], v[j] = n; j = j+1], {n, 1, 2*max}]; Do[ a[n] = -v[n]*If[Mod[v[n], 4] == 3, 1, 4], {n, 1, j-1}]; Table[a[n], {n, 1, max}] (* _Jean-François Alcover_, Oct 18 2011, after PARI *)

%o (PARI) bnd = 1000; L = vector(bnd); j = 1; for (i=1,bnd, if(issquarefree(i),L[j]=i:j=j+1)); M = vector(j-1); for (i=1,j-1,M[i]=if((L[i]%4==3),-L[i],-4*L[i])); M

%Y Values of n run through A005117. See A000924 for class numbers of these fields.

%K sign,easy,nice

%O 1,1

%A _N. J. A. Sloane_