prime?

check if given integer is prime


Parameters

prime? number :integer

Returns

  • :logical

Examples

copy
prime? 2 ; => true prime? 6 ; => false prime? 11 ; => true

copy
; let's check the 14th Mersenne: ; 53113799281676709868958820655246862732959311772703192319944413 ; 82004035598608522427391625022652292856688893294862465010153465 ; 79337652707239409519978766587351943831270835393219031728127 prime? (2^607)-1 ; => true

Related