jukaukor

CollectionProduct.jl

May 26th, 2020
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. # 2,3,4,5 -alkulukujokkojen tulot alkuluvuista testi
  2. nnumbers = Int64[] # sisältää kongruenssin toteuttamat joukot
  3. for i in 2:5
  4. joukko = collect(combinations(testi,i))
  5. for j in 1 : length(joukko)
  6. tulo = prod(joukko[j])
  7. if powermod(2,tulo-2,tulo) == 1
  8. push!(nnumbers,tulo)
  9. println(tulo," ",factor(tulo))
  10. end
  11. end
  12. end
Advertisement
Add Comment
Please, Sign In to add comment