Advertisement
MatsGranvik

The Liouville function

Oct 15th, 2021
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. (* Mathematica 8.0.1 *)
  2. (*start*)
  3. nn = 15;
  4. Table[Sum[If[a^2 == n, 1, 0], {a, 1, nn}] -
  5. Sum[Sum[If[a^2*b == n, 1, 0], {a, 1, nn}], {b, 2, nn}] +
  6. Sum[Sum[Sum[If[a^2*b*c == n, 1, 0], {a, 1, nn}], {b, 2, nn}], {c, 2,
  7. nn}] - +Sum[
  8. Sum[Sum[Sum[If[a^2*b*c*d == n, 1, 0], {a, 1, nn}], {b, 2,
  9. nn}], {c, 2, nn}], {d, 2, nn}], {n, 1, nn}]
  10. LiouvilleLambda[Range[nn]]
  11. %% - %
  12. (*end*)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement