Advertisement
MatsGranvik

Prime signature

Mar 5th, 2020
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. (*start*)
  2. Clear[A, b, nn, n, x];
  3. nn = 500;
  4. b = Inverse[
  5. A = Table[
  6. Table[If[Mod[n, k] == 0, 1 + x, 0], {k, 1, nn}], {n, 1, nn}] -
  7. IdentityMatrix[nn]*x][[All, 1]]
  8. TableForm[Table[{n, b[[n]]}, {n, 1, 20}]]
  9. S = DeleteDuplicates[
  10. Table[Flatten[Position[b, b[[n]]]], {n, 2, Length[b]}]];
  11. "Polynomial first:"
  12. Do[Print[{b[[S[[n]]]][[1]], S[[n]]}], {n, 1, Length[S]}]
  13. Clear[p, q, r, s, t];
  14. primesignature = {p, p^2, p*q, p^3, p^2*q, p^4, p^3*q, p*q*r, p^5,
  15. p^2*q^2, p^4*q, p^2*q*r, p^6, p^3*q^2, p^5*q, p^3*q*r, p^7,
  16. p^4*q^2, p^2*q^2*r, p^6*q, p*q*r*s};
  17. TableForm[
  18. Table[{primesignature[[n]], b[[S[[n]]]][[1]]}, {n, 1,
  19. Length[primesignature]}]]
  20. (*end*)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement