(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 4.2' Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 4094, 147]*) (*NotebookOutlinePosition[ 4724, 169]*) (* CellTagsIndexPosition[ 4680, 165]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Demo Priemtesten", "Title"], Cell[CellGroupData[{ Cell["Het commando PowerMod", "Subsection"], Cell["\<\ Hier is een voorbeeld van een pseudo-priemtest met behulp van \ Fermat\ \>", "Text"], Cell[BoxData[ \(n = \((10^71 - 1)\)/9\)], "Input"], Cell[BoxData[ \(PowerMod[2, n - 1, n]\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Het commando FactorInteger", "Subsection"], Cell["\<\ Voor getallen met 60 of meer cijfers lukt de ontbinding nauwelijks \ meer. Hier is een voorbeeld\ \>", "Text"], Cell[BoxData[ \(n = \((10^67 - 1)\)/9\)], "Input"], Cell[BoxData[ \(FactorInteger[n]\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Het commando PrimeQ", "Subsection"], Cell[TextData[{ "Het commando ", StyleBox["PrimeQ", FontWeight->"Bold"], " voert een Rabin pseudo priemtest uit. Indien dit commando ", StyleBox["False", FontFamily->"Courier"], " als uitkomst geeft, dan is dit 100 procent betrouwbaar, de uitkomst ", StyleBox["True ", FontFamily->"Courier"], "is 99,9999999... procent betrouwbaar. Volgens de ", StyleBox["Mathematica", FontSlant->"Italic"], " documentatie is er nog geen enkel samengesteld getal bekend waarvoor ", StyleBox["PrimeQ", FontWeight->"Bold"], " het antwoord ", StyleBox["True", FontFamily->"Courier"], " oplevert.\n\nOndanks de ongeschiktheid als echte priemtest is ", StyleBox["PrimeQ", FontWeight->"Bold"], " wel geschikt om kandidaat priemgetallen te ontdekken. Bijvoorbeeld om \ kandidaatpriemgetallen in een interval te localiseren." }], "Text"], Cell[BoxData[ \(For[k = 10^100, k < 10^100 + 1000, \(k++\), If[PrimeQ[k], Print[k]]]\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["De Lehmer priemtest", "Subsection"], Cell["\<\ We proberen een priemgetal van de vorm 7.2^k+1 met k>400 te vinden.\ \ \>", "Text"], Cell[BoxData[ \(For[k = 400, k < 800, \(k++\), nn = 7*2^k + 1; If[PowerMod[2, nn - 1, nn] == 1, Print[k]]]\)], "Input"], Cell["Nu testen of 7.2^432+1 werkelijk priem is.", "Text"], Cell[BoxData[ \(nn = 7*2^432 + 1\)], "Input"], Cell[BoxData[{ \(\(a = 2;\)\), "\[IndentingNewLine]", \(PowerMod[a, \((nn - 1)\)/2, nn]\), "\[IndentingNewLine]", \(PowerMod[a, \((nn - 1)\)/7, nn]\)}], "Input"] }, Closed]] }, Open ]] }, FrontEndVersion->"4.2 for X", ScreenRectangle->{{0, 1152}, {0, 900}}, WindowSize->{520, 600}, WindowMargins->{{Automatic, 249}, {Automatic, 63}} ] (******************************************************************* Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. *******************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1776, 53, 33, 0, 117, "Title"], Cell[CellGroupData[{ Cell[1834, 57, 43, 0, 45, "Subsection"], Cell[1880, 59, 94, 3, 32, "Text"], Cell[1977, 64, 54, 1, 27, "Input"], Cell[2034, 67, 54, 1, 27, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[2125, 73, 48, 0, 29, "Subsection"], Cell[2176, 75, 120, 3, 50, "Text"], Cell[2299, 80, 54, 1, 27, "Input"], Cell[2356, 83, 49, 1, 27, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[2442, 89, 41, 0, 29, "Subsection"], Cell[2486, 91, 871, 24, 158, "Text"], Cell[3360, 117, 108, 2, 43, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[3505, 124, 41, 0, 29, "Subsection"], Cell[3549, 126, 93, 3, 32, "Text"], Cell[3645, 131, 130, 2, 43, "Input"], Cell[3778, 135, 58, 0, 32, "Text"], Cell[3839, 137, 49, 1, 27, "Input"], Cell[3891, 140, 175, 3, 59, "Input"] }, Closed]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)