File:Gaussian primes.png

Original file(1,200 × 1,198 pixels, file size: 16 KB, MIME type: image/png)

Commons-logo.svg This is a file from the Wikimedia Commons. The description on its description page there is shown below.
Commons is a freely licensed media file repository. You can help.
This math image could be re-created using vector graphics as an SVG file. This has several advantages; see Commons:Media for cleanup for more information. If an SVG form of this image is available, please upload it and afterwards replace this template with {{vector version available|new image name}}.


It is recommended to name the SVG file “Gaussian primes.svg”—then the template Vector version available (or Vva) does not need the new image name parameter.

Summary

Description Gaussian primes with norm less than 500
Date
Source own work, with Mathematica 6.0
Author User:Hack
Permission
(Reusing this file)
Public Domain

Licensing

Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
In some countries this may not be legally possible; if so:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

Mathematica Program


poly[x_, y_] := 
    Polygon[{{x + 1/2, y + 1/2}, {x - 1/2, y + 1/2},
             {x - 1/2, y - 1/2}, {x + 1/2, y - 1/2}}];

primelist = 
    Module[{l, b}, l = {}; 
      Do[b = 0; 
        While[a^2 + b^2 < 500, If[PrimeQ[a + b I, GaussianIntegers -> True],
            l = Join[l, {poly[a, b], poly[a, -b], poly[-a, b], poly[-a, -b]}]]; 
          b = b + 1], {a, 0, 22}]; l];

gauss = Apply[Show, Join[Map[Graphics, primelist], {AspectRatio -> Automatic}]];

Export["gaussian prime.png", gauss, ImageSize -> 1200];

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

7 December 2007

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeDimensionsUserComment
current09:27, 6 December 20071,200 × 1,198 (16 KB)Hack~commonswiki{{Information |Description= Gaussian primes with norm less than 500 |Source= own work, with Mathematica 6.0 |Date= December 7, 2007 |Author= User:Hack |Permission= Public Domain |other_versions= }}

The following 2 pages use this file: