Jump to content

Giuga numbers: Difference between revisions

m
m (syntax highlighting fixup automation)
Line 384:
 
=={{header|Julia}}==
<syntaxhighlight lang="rubyjulia">using Primes
 
isGiuga(n) = all(f -> f != n && rem(n ÷ f - 1, f) == 0, factor(Vector, n))
Line 407:
</pre>
=== Ad hoc faster version ===
<syntaxhighlight lang="rubyjulia">using Primes
 
function getgiugas(numberwanted, verbose = true)
4,104

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.