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.

A033198 Discriminants of real quadratic number fields.

This page as a plain text file.
%I A033198 #18 Mar 22 2023 12:02:02
%S A033198 8,12,5,24,28,40,44,13,56,60,17,76,21,88,92,104,29,120,124,33,136,140,
%T A033198 37,152,156,41,168,172,184,188,204,53,220,57,232,236,61,248,65,264,
%U A033198 268,69,280,284,73,296,77,312,316,328,332,85,344,348,89,364,93,376,380,97
%N A033198 Discriminants of real quadratic number fields.
%D A033198 David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989, p. 103.
%F A033198 For squarefree n >= 2, list n if n=1 mod 4 else 4n.
%p A033198 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 A033198 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 A033198 Cf. A144338.
%K A033198 nonn,easy
%O A033198 1,1
%A A033198 _N. J. A. Sloane_
%E A033198 More terms from C. Ronaldo (aga_new_ac(AT)hotmail.com), Jan 03 2005