Mersenne primes: Difference between revisions

m
→‎{{header|Kotlin}}: Replaced 'shiftLeft' function with more idiomatic 'shl' infix function introduced in v1.2.
(Add Perl)
m (→‎{{header|Kotlin}}: Replaced 'shiftLeft' function with more idiomatic 'shl' infix function introduced in v1.2.)
Line 77:
var p = 2
while (true) {
val m = (bigTwo.shiftLeft shl (p - 1)) - bigOne
if (m.isProbablePrime(10)) {
println("2 ^ $p - 1")
9,492

edits