File:Dickman prob factor size.svg

From testwiki
Jump to navigation Jump to search
    Original file (SVG file, nominally 1,076 × 688 pixels, file size: 41 KB)

    This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

    Summary

    Description
    English: Plot of probability that the largest and second largest prime factor of x is less than x^a

    With p(u) = Dickman function, plot(p(1/a), a = 0 to 1)

    Based on solving the delay differential equations

    uρ′(u)+ρ(u−1)=0
    uτ′(u)+τ(u−1)−ρ(u−1)=0
    with initial conditions ρ(u)=τ(u)=1 for 0 ≤ u ≤ 1.
    Date
    Source Own work
    Author SethT

    Based on a similar graphic from Knuth 4.5.4 Fig 11, p. 362

    Source Code

    Mathematica source code
    uMax := 100;
    sol = NDSolve[
       {u*p'[u] + p[u - 1] == 0,
        p[u /; u <= 1] == 1,
        u*q'[u] + q[u - 1] - p[u - 1] == 0, 
        q[u /; u <= 1] == 1},
       {p, q},
       {u, 0, uMax},
       WorkingPrecision -> 40, PrecisionGoal -> 20];
    
    NP[u_] := Piecewise[{{p[u] /. First[sol], u <= uMax}}, 0]
    (* Use derivative for very small a via interpolatated large u *)
    NQ[u_] := 
     Piecewise[{{q[u] /. First[sol], 
        u <= uMax}}, (1/u)*(q[uMax] /. First[sol])*uMax]
    F2[a_] := NP[1/a]
    G2[a_] := NQ[1/a]
    Plot[{F2[a], G2[a]}, {a, 0, 1}, PlotRange -> All, 
     Ticks -> {{#, x^#} & /@ Range[0, 1, 0.1], Automatic}, 
     BaseStyle -> {FontWeight -> Bold, FontSize -> 12}, 
     PlotStyle -> Blue, GridLines -> All, PlotRangePadding -> 0.004]
    LogPlot[{NP[u]}, {u, 0, 15}]
    Plot[{NQ[u]}, {u, 0, uMax}, PlotRange -> Full]

    Licensing

    I, the copyright holder of this work, hereby publish it under the following license:
    w:en:Creative Commons
    attribution share alike
    This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
    You are free:
    • to share – to copy, distribute and transmit the work
    • to remix – to adapt the work
    Under the following conditions:
    • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
    • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

    Captions

    Add a one-line explanation of what this file represents

    Items portrayed in this file

    depicts

    21 April 2019

    image/svg+xml

    41,878 byte

    caa3dda3436160823227ea2acda248a8efde6e28

    File history

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

    Date/TimeThumbnailDimensionsUserComment
    current09:38, 22 April 2019Thumbnail for version as of 09:38, 22 April 20191,076 × 688 (41 KB)wikimediacommons>SethTSlightly better display of function at y=0 and y=1

    There are no pages that use this file.