Skip to main content
added 21 characters in body
Source Link
alephalpha
  • 51.9k
  • 7
  • 75
  • 196

SamauSamau, 2 bytes

▌τ 

Hex dump:

dd ab 

Yes, it's 2 bytes. Samau uses CP737 as its default character encoding.

▌ read a number τ test if it is a prime 

τ uses the isCertifiedPrime function in the haskell package arithmoi. It's not a probabilistic algorithm.


There's also a 7-bytes answer if built-ins are not allowed:

▌;\│Σ2= 

Hex dump:

dd 3b 5c b3 91 32 3d 

Most mathematical functions in Samau automatically thread over lists.

▌ read a number, let's call it n ; duplicate \ range from 1 to n | return 1 for divisors of n, and 0 for the other numbers Σ take the sum =2 if the sum is 2, then it's a prime 

Samau, 2 bytes

▌τ 

Hex dump:

dd ab 

Yes, it's 2 bytes. Samau uses CP737 as its default character encoding.

▌ read a number τ test if it is a prime 

τ uses the isCertifiedPrime function in the haskell package arithmoi. It's not a probabilistic algorithm.


There's also a 7-bytes answer if built-ins are not allowed:

▌;\│Σ2= 

Hex dump:

dd 3b 5c b3 91 32 3d 

Most mathematical functions in Samau automatically thread over lists.

▌ read a number, let's call it n ; duplicate \ range from 1 to n | return 1 for divisors of n, and 0 for the other numbers Σ take the sum =2 if the sum is 2, then it's a prime 

Samau, 2 bytes

▌τ 

Hex dump:

dd ab 

Yes, it's 2 bytes. Samau uses CP737 as its default character encoding.

▌ read a number τ test if it is a prime 

τ uses the isCertifiedPrime function in the haskell package arithmoi. It's not a probabilistic algorithm.


There's also a 7-bytes answer if built-ins are not allowed:

▌;\│Σ2= 

Hex dump:

dd 3b 5c b3 91 32 3d 

Most mathematical functions in Samau automatically thread over lists.

▌ read a number, let's call it n ; duplicate \ range from 1 to n | return 1 for divisors of n, and 0 for the other numbers Σ take the sum =2 if the sum is 2, then it's a prime 
added 68 characters in body
Source Link
alephalpha
  • 51.9k
  • 7
  • 75
  • 196

Samau, 2 bytes

▌τ 

Hex dump:

dd ab 

Yes, it's 2 bytes. Samau uses CP737 as its default character encoding.

▌ read a number τ test if it is a prime 

τ uses the isCertifiedPrime function in the haskell package arithmoi. It's not a probabilistic algorithm.


There's also a 7-bytes answer if built-ins are not allowed:

▌;\│Σ2= 

Hex dump:

dd 3b 5c b3 91 32 3d 

Most mathematical functions in Samau automatically thread over lists.

▌ read a number, let's call it n ; duplicate \ range from 1 to n | return 1 for divisors of n, and 0 for the other numbers Σ take the sum =2 if the sum is 2, then it's a prime 

Samau, 2 bytes

▌τ 

Yes, it's 2 bytes. Samau uses CP737 as its default character encoding.

▌ read a number τ test if it is a prime 

τ uses the isCertifiedPrime function in the haskell package arithmoi. It's not a probabilistic algorithm.


There's also a 7-bytes answer if built-ins are not allowed:

▌;\│Σ2= 

Most mathematical functions in Samau automatically thread over lists.

▌ read a number, let's call it n ; duplicate \ range from 1 to n | return 1 for divisors of n, and 0 for the other numbers Σ take the sum =2 if the sum is 2, then it's a prime 

Samau, 2 bytes

▌τ 

Hex dump:

dd ab 

Yes, it's 2 bytes. Samau uses CP737 as its default character encoding.

▌ read a number τ test if it is a prime 

τ uses the isCertifiedPrime function in the haskell package arithmoi. It's not a probabilistic algorithm.


There's also a 7-bytes answer if built-ins are not allowed:

▌;\│Σ2= 

Hex dump:

dd 3b 5c b3 91 32 3d 

Most mathematical functions in Samau automatically thread over lists.

▌ read a number, let's call it n ; duplicate \ range from 1 to n | return 1 for divisors of n, and 0 for the other numbers Σ take the sum =2 if the sum is 2, then it's a prime 
edited body
Source Link
alephalpha
  • 51.9k
  • 7
  • 75
  • 196

Samau, 2 bytes

▌τ 

Yes, it's 2 bytes. Samau uses CP737 as its default character encoding.

▌ read a number τ test if it is a prime 

τ uses the isCertifiedPrime function in the haskell package arithmoi. It's not a probabilistic algorithm.


There's also a 7-bytes answer if built-ins are not allowed:

▌;\│Σ2= 

Most mathematical functions in Samau automatically thread over lists.

▌ read a number, let's call it n ; duplicate \ range from 1 to n | return 1 for those divisibledivisors byof n, and 0 for the othersother numbers Σ take the sum =2 if the sum is 2, then it's a prime 

Samau, 2 bytes

▌τ 

Yes, it's 2 bytes. Samau uses CP737 as its default character encoding.

▌ read a number τ test if it is a prime 

τ uses the isCertifiedPrime function in the haskell package arithmoi. It's not a probabilistic algorithm.


There's also a 7-bytes answer if built-ins are not allowed:

▌;\│Σ2= 

Most mathematical functions in Samau automatically thread over lists.

▌ read a number, let's call it n ; duplicate \ range from 1 to n | return 1 for those divisible by n, and 0 for the others Σ take the sum =2 if the sum is 2, then it's a prime 

Samau, 2 bytes

▌τ 

Yes, it's 2 bytes. Samau uses CP737 as its default character encoding.

▌ read a number τ test if it is a prime 

τ uses the isCertifiedPrime function in the haskell package arithmoi. It's not a probabilistic algorithm.


There's also a 7-bytes answer if built-ins are not allowed:

▌;\│Σ2= 

Most mathematical functions in Samau automatically thread over lists.

▌ read a number, let's call it n ; duplicate \ range from 1 to n | return 1 for divisors of n, and 0 for the other numbers Σ take the sum =2 if the sum is 2, then it's a prime 
Source Link
alephalpha
  • 51.9k
  • 7
  • 75
  • 196
Loading