diff options
author | f1bi1n <109807532+f1bi1n@users.noreply.github.com> | 2022-08-15 20:21:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-15 20:21:26 +0200 |
commit | 13e80fa4f6ca5fb0551e2e3adca931d32091cab1 (patch) | |
tree | 2793c654e5d5f4556a32c7dfea915fd37c74f59b /buch/papers/zeta/python/primzahlfunktion.py | |
parent | 2.Uerbarbeitung, bruch (diff) | |
parent | Merge pull request #50 from ntobler/master (diff) | |
download | SeminarSpezielleFunktionen-13e80fa4f6ca5fb0551e2e3adca931d32091cab1.tar.gz SeminarSpezielleFunktionen-13e80fa4f6ca5fb0551e2e3adca931d32091cab1.zip |
Merge branch 'master' into master
Diffstat (limited to '')
-rw-r--r-- | buch/papers/zeta/python/primzahlfunktion.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/buch/papers/zeta/python/primzahlfunktion.py b/buch/papers/zeta/python/primzahlfunktion.py new file mode 100644 index 0000000..9434de9 --- /dev/null +++ b/buch/papers/zeta/python/primzahlfunktion.py @@ -0,0 +1,24 @@ +import matplotlib.pyplot as plt +import numpy as np + +primzahlfunktion = [0, 0, 0, 0] +x = [0, 1-1e-12, 1, 2-1e-12] +x_last = 1 +value = 0 +for i in range(2, 30, 1): + new_value = value + 1 + for j in range(2, i, 1): + if i % j == 0: + new_value = value + value = new_value + primzahlfunktion.append(new_value) + x_last += 1 + x.append(x_last) + primzahlfunktion.append(new_value) + x.append(x_last + 1 - 1e-12) + + +plt.rcParams.update({"pgf.texsystem": "pdflatex"}) +plt.plot(x, primzahlfunktion) +plt.show() + |