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.

Original entry on oeis.org

8, 12, 5, 24, 28, 40, 44, 13, 56, 60, 17, 76, 21, 88, 92, 104, 29, 120, 124, 33, 136, 140, 37, 152, 156, 41, 168, 172, 184, 188, 204, 53, 220, 57, 232, 236, 61, 248, 65, 264, 268, 69, 280, 284, 73, 296, 77, 312, 316, 328, 332, 85, 344, 348, 89, 364, 93, 376, 380, 97
Offset: 1

Views

Author

Keywords

References

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

Crossrefs

Cf. A144338.

Programs

  • Maple
    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
  • Mathematica
    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 *)

Formula

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

Extensions

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