login
Discriminants of real quadratic number fields.
0

%I #18 Mar 22 2023 12:02:02

%S 8,12,5,24,28,40,44,13,56,60,17,76,21,88,92,104,29,120,124,33,136,140,

%T 37,152,156,41,168,172,184,188,204,53,220,57,232,236,61,248,65,264,

%U 268,69,280,284,73,296,77,312,316,328,332,85,344,348,89,364,93,376,380,97

%N Discriminants of real quadratic number fields.

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

%F For squarefree n >= 2, list n if n=1 mod 4 else 4n.

%p with(numtheory): a:= proc(n) if issqrfree(n) then RETURN(piecewise(n mod 4=1,n,4*n)) else RETURN(NULL) fi: end: seq(a(n),n=2..150); # C. Ronaldo (aga_new_ac(AT)hotmail.com), Jan 03 2005

%t Reap[For[n = 2, n <= 100, n++, If[SquareFreeQ[n], Sow[If[Mod[n, 4] == 1, n, 4 n]]]]][[2, 1]] (* _Jean-François Alcover_, Mar 22 2023 *)

%Y Cf. A144338.

%K nonn,easy

%O 1,1

%A _N. J. A. Sloane_

%E More terms from C. Ronaldo (aga_new_ac(AT)hotmail.com), Jan 03 2005