[Question]
  [
> 
> A Primenary (*binary-prime*) string is one which, when written as a binary grid, every row and column has a prime total.
> 
> 
> 
That's quite a vague explanation, so let's break it down with a worked example...
---
For this example we'll use the string `bunny`:
First, find the ASCII code point of each character and its binary representation:
```
Char | ASCII | Binary
b      98      1100010
u      117     1110101
n      110     1101110
n      110     1101110
y      121     1111001
```
Take these binary values, from top to bottom, and arrange them into grid (adding leading zeros if necessary):
```
1 1 0 0 0 1 0
1 1 1 0 1 0 1
1 1 0 1 1 1 0
1 1 0 1 1 1 0
1 1 1 1 0 0 1
```
Then, count the number of `1`s in each row and column:
```
1 1 0 0 0 1 0   > 3
1 1 1 0 1 0 1   > 5
1 1 0 1 1 1 0   > 5
1 1 0 1 1 1 0   > 5
1 1 1 1 0 0 1   > 5
v v v v v v v
5 5 2 3 3 3 2
```
If, and only if, every single total is prime (such as here) then the string is a valid binary-prime.
---
# The Challenge
Your task is to create a function or program which, when given a string, returns/outputs `truthy` if the string is primenary, and `falsy` otherwise.
**Rules/Details**
* You may assume that the string's characters will always be in the ASCII range `33-126` (inclusive).
* The string will not be empty.
* A primenary string does **not** have to have a prime length - for example, `W1n*` is valid, despite having 4 characters.
* This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the shortest answer (in bytes) wins - but all submissions are welcome.
* Standard loopholes are banned.
---
# Test Cases
```
'husband'     -> True
'HOTJava'     -> True
'COmPaTIBILE' -> True
'AuT0HACk'    -> True
'PPCW'        -> False
'code-golf'   -> False
'C++'         -> False
'/kD'         -> False
'HI'          -> False
'A'           -> False
```
There is also a working, but incredibly verbose [**Python example on repl.it**](https://repl.it/EPcM/1) that you can test your solution against.
  
[Answer]
# MATL, 10 bytes
```
BtXsw!shZp
```
[Try it online!](http://matl.tryitonline.net/#code=QnRYc3chc2hacA&input=J0hlbGxvIFdvcmxkJw)
This is the ideal language for the job. It's pretty much a literal transliteration of the challenge specification.
```
Bt % Converts input to binary matrix, duplicate
Xs  % Sum columns (alternative X version to prevent defaulting to sum along first non-singleton dimension, thanks @Jonathan Allan)
w! % Get the duplicate to the top of the stack, transpose
s  % Sum again
h  % Concatenate horizontally
Zp % Check primality element-wise. Display implicitly.
```
Since any zero makes a MATL array falsy as per [meta](http://meta.codegolf.stackexchange.com/a/2194/32352), nothing else is needed - basically, an implicit `A` is called on `?` (if).
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~13 12~~ 11 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
OBUZ;$S‚Ç¨√ÜP·∫†
```
**[TryItOnline!](http://jelly.tryitonline.net/#code=T0JVWjskU-KCrMOGUOG6oA&input=&args=YnVubnk)** or [all test cases](http://jelly.tryitonline.net/#code=T0JVWjskU-KCrMOGUOG6oArFvMOH4oKsS1k&input=&args=WyJidW5ueSIsICJodXNiYW5kIiwgIkhPVEphdmEiLCAiQ09tUGFUSUJJTEUiLCAiQXVUMEhBQ2siLCAiUFBDVyIsICJjb2RlLWdvbGYiLCAiQysrIiwgIi9rRCJd)
### How?
```
OBUZ;$S‚Ç¨√ÜP·∫† - Main link: word                  e.g. ha!
O           - cast to ordinals                 e.g. [104,97,33]
 B          - convert to binary                e.g. [[1,1,0,1,0,0,0],[1,1,0,0,0,0,1],[1,0,0,0,0,1]]
  U         - reverse each entry (say "b")     e.g. [[0,0,0,1,0,1,1],[1,0,0,0,0,1,1],[1,0,0,0,0,1]]
     $      - last two links as a monad
   Z        - transpose                        e.g. [[0,1,1],[0,0,0],[0,0,0],[1,0,0],[0,0,0],[1,1,1],[1,1]]
    ;       - concatenate with "b"             e.g. [[0,1,1],[0,0,0],[0,0,0],[1,0,0],[0,0,0],[1,1,1],[1,1],[0,0,0,1,0,1,1],[1,0,0,0,0,1,1],[1,0,0,0,0,1]]
      S‚Ç¨    - sum ‚Ç¨ach                         e.g. [2,0,0,1,0,3,2,3,3,2]
        √ÜP  - is prime (1 if prime, 0 if not)  e.g. [1,0,0,0,0,1,1,1,1,1]
          ·∫† - all truthy?                      e.g. 0
```
[Answer]
# [05AB1E](http://github.com/Adriandmen/05AB1E), 17 bytes
```
√á≈æz+b‚Ç¨¬¶‚Ç¨SD√∏√¨O0√õpP
```
[Try it online!](http://05ab1e.tryitonline.net/#code=w4fFvnorYuKCrMKm4oKsU0TDuMOsTzDDm3BQ&input=QXVUMEhBQ2s)
[Answer]
# [Jelly](http://github.com/DennisMitchell/jelly), 15 bytes
```
O+‚ÅπB·π´‚Ç¨3¬µS‚Ç¨;S√ÜPP
```
[Try it online!](http://jelly.tryitonline.net/#code=TyvigblC4bmr4oKsM8K1U-KCrDtTw4ZQUA&input=&args=YnVubnk) or [Verify all test cases.](http://jelly.tryitonline.net/#code=TyvigblC4bmr4oKsM8K1U-KCrDtTw4ZQUArDh-KCrA&input=&args=WydidW5ueScsICdodXNiYW5kJywgJ0hPVEphdmEnLCAnQ09tUGFUSUJJTEUnLCAnQXVUMEhBQ2snLCAnUFBDVycsICdjb2RlLWdvbGYnLCAnQysrJywgJy9rRCdd).
## Explanation
```
O+‚ÅπB·π´‚Ç¨3¬µS‚Ç¨;S√ÜPP  Main link. Input: string z
O                Ordinal, get ASCII value of each char
  ‚Åπ              Nilad representing 256
 +               Add 256 to each ordinal value
   B             Binary digits of each
    ·π´‚Ç¨3          Tail, take each list of digits from the 3rd value to the end
                 These are the last seven digits of each
       ¬µ         Start a new monadic chain
        S‚Ç¨       Sum each list of digits by rows
           S     Sum by column
          ;      Concatenate
            √ÜP   Test if each is prime, 1 if true else 0
              P  Product
```
[Answer]
# Mathematica, 75 bytes
```
And@@Join@@PrimeQ@{+##&@@#,+##&@@@#}&@IntegerDigits[ToCharacterCode@#,2,7]&
```
Unnamed function taking a string as input and returning `True` or `False`.
`ToCharacterCode@#` converts the input into the list of its ASCII values; `IntegerDigits[...,2,7]` turns each value into the list of its bits, padded to length 7 if necessary. So now we have a 2D array and we want all its row sums and column sums; lo and behold, the character-spasm `{+##&@@#,+##&@@@#}&@...` does exactly that (it applies the `+##&`, "sum all arguments", function to the list of vectors in the first coordinate using `@@`, and to each vector as its own list of integers in the second coordinate using `@@@`). Then we just check whether the results are `PrimeQ`, flatten the list with `Join@@`, and take the `And` of all those values.
[Answer]
# [Ruby](https://www.ruby-lang.org/) `-rprime`, 100 bytes
```
->s{a=s.bytes.map{|b|b.digits 2}
a.all?{|r|r.sum.prime?}&([0]*7).zip(*a).all?{|c|c.count(1).prime?}}
```
[Try it online!](https://tio.run/##Nc1Na4MwGADg@/srPIyiLabdLju1xbqBlkE9CDuUUpIYNdSYkI@NzvjXl8HY7g882pF7aLch3ZkJbw0id8sMElhNnniCGt5xa6KnGTDCw7CfvPYaGSeQ0lyw/byIz5vL8jlBX1zFS5z8KeopotKNNn5M/ukcVNSeH66I9lKoy2fPBxZ1zJrQO0Pw2EBxqo/4A0N@EhWuy0P59gqZqzdFlt@gqvJ3oLJhaSeHFvLVCta3FyhKyL6lslyOJqT69/oB "Ruby ‚Äì Try It Online")
**Explanation**
```
->s{
    a=s.bytes                       # Get byte values from string
             .map{|b|b.digits 2}    # For each, map it to its binary digits
                                    #   (least significant digits first)
a.all?{|r|r.sum.prime?}             # Each character has a prime number of 1's?
    &                               # Bit-and (because it saves bytes here)
    ([0]*7).zip(*a)                 # Zip bit array with an all-zero array
                                    #   (If we don't, then uneven array lengths
                                    #   cause some columns to not be returned.)
    .all?{|c|c.count(1).prime?}     # All columns have a prime number of 1's?
                                    #   (We use count instead of sum here because
                                    #   zip pads columns with trailing nils, which
                                    #   can't be added to numbers via sum.)
}
```
[Answer]
# Perl, ~~151~~ ~~121~~ 111 + 3 = 114 bytes
Run with `-lF`. The program will only function correctly for the first input. Terminate the program and rerun for your next input.
Thanks to @Dada for letting me know the `//` after `F` were redundant. An additional byte can be removed (for 112) by piping the input in via `echo -n`, but I feel that that's technically adding more code, so YMMV.
```
for$c(@a=map{sprintf"%07b",ord}@F){$b[$_].=substr$c,$_,1 for 0..6}s/0//g,$d|=/^1?$|^(11+?)\1+$/ for@a,@b;say!$d
```
Readable:
```
                                     #Implicitly split input into characters in @F array
for$c(@a=map{sprintf"%07b",ord}@F)  #Convert @F to 7-bit binary as @a, then loop through it                        
    $b[$_].=substr$c,$_,1 for 0..6   #Transpose @a's bits into @b
}
s/0//g,$d|=/^1?$|^(11+?)\1+$/ for@a,@b; #Remove any zeros, then run through composite regex
say!$d                          #If all composite regex checks fail, then it's fully prime.
```
[Answer]
# Python 3, ~~228~~ ~~227~~ 225 bytes
Not a great answer, I wasn't able to golf it as much as I would've liked, but I spent so long on it I feel I should post it. Suggestions on cutting bytes would be greatly appreciated.
```
r=range
n=[format(ord(c),"08b")for c in input()]
n=map(lambda s:s.count("1"),n+["".join([f[1]for f in filter(lambda e:e[0]%8<1,enumerate("X"*-~i+"".join(n)))][1:])for i in r(8)])
print(all(all(s%d for d in r(2,s))for s in n))
```
**Edit 1:** replaced `e[0]%8==0` with `e[0]%8<1`, losing a byte. Thanks Flp.Tkc!
**Edit 2:** replacing (i+1) with -~i, losing two additional bytes. Thanks Erik for exposing how bad my bit-level knowledge is :) While testing this revision, I discovered that `kappa` is valid... make of that what you will.
[Answer]
# Groovy, ~~151~~ 137 bytes
```
{p={x->x<3||(2..(x**0.5)).every{x%it}};y={it.every{p(it.count("1"))}};x=it.collect{0.toString((int)it,2) as List};y(x)&&y(x.transpose())}
```
No primality check in groovy...
`p={x->x<3||(2..(x**0.5)).every{x%it}};` - Closure for primality testing.
`y={it.every{p(it.count("1"))}};` - Closure to ensure that all counts of "1" for a passed binary 2D array are prime.
`x=it.collect{0.toString((int)it,2) as List};` - Coversion from string to binary array.
`y(x)&&y(x.transpose())` - For all prime-validated sums in the main matrix and the transposed matrix, ensure that they return true.
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 37 bytes
```
L.AmP_sdb=sMM.[L\0lh.MlZQ=.BMQ&yZy.TZ
```
[Try it online!](https://tio.run/##K6gsyfj/30fPMTcgvjglybbY11cv2ifGICdDzzcnKtBWz8k3UK0yqlIvJOr/fyUP/xCvxLJEJ)
---
```
                                 Code | Explanation
--------------------------------------+----------------------------------------------------------------
L.AmP_sdb=sMM.[L\0lh.MlZQ=.BMQ&yZy.TZ | Full code
L                                     | Define function y(b):
   m    b                             |   For each d in b:
    P_sd                              |     Is the sum of the elements of the list prime?
 .A                                   |   Return whether all elements of the resulting list are truthy
                         =   Q        | Assign the following to Q:
                          .BMQ        |   The list of binary strings for each character in the input
         =             Z              | Assign the following to Z:
               L             Q        |   For every element in Q:
             .[ \0                    |     Pad with 0 on the left
                  lh.MlZQ             |     To the length of the longest element in Q
            M                         |   For each element in the resulting list:
          sM                          |     Convert each character to an integer
                              &yZ     | Print y(Z) AND
                                 y.TZ |   y( <Transpose of Z> )
```
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 14 bytes
```
·∫°·∏É·µêB‚Üî·µêz‚ÇÅ,B+·µê·πó·µê
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/pfXa6koGunoFRuX/2obcOjpuZHHcuVSopKU/WUakDMtMScYiC79uGuztqHWyf8f7hr4cMdzUCW06O2KUCq6lFTo46TNpD1cOd0kIL/0UoZpcVJiXkpSjpKAQHO4UDKwz/EK7EsEchKzk9J1U3Pz0kDsp39cwMSQzydPH1cQTxtbSDpWBpi4OHonA1k6me7gLR6gkRB2FEpFgA "Brachylog ‚Äì Try It Online")
Outputs through success or failure. (In the case of success, a list of all column and row sums is available through the output variable.
```
   B              The variable B is
·∫°                 the codepoints of the input
 ·∏É·µê               converted to lists of binary digits,
    ‚Üî·µê            which with each list reversed
      z‚ÇÅ          then zipped without cycling
        ,B        and concatenated with B
          +·µê      has elements which all sum to
            ·πó·µê    prime numbers.
```
[Answer]
# O5AB1E, 12 bytes
```
√á≈æy+b√∏‚Ç¨SOp¬¶W
```
[Try it online!](https://tio.run/##MzBNTDJM/f//cPvRfZXaSYd3PGpaE@xfcGhZ@P//GaXFSYl5KQA "05AB1E (legacy) ‚Äì Try It Online")
This is my first code golf so go easy :)
```
√á              % Converts the implicit input into ascii values
 ≈æy+           % Adds 128 to each value, inspired by Emigna as a way to pad zeros
    b          % Convert all values into bits
     √∏         % Transpose
      ‚Ç¨SO      % Sum each string of binary digits created
         p¬¶    % Check if each element is prime and cut the first element out (adding 128 makes it equal to the number of characters)
           W   % Take the minimum value to effectively "and" all the elements
```
[Answer]
# [Python 3](https://docs.python.org/3/), ~~209~~ ~~189~~ ~~180~~ ~~171~~ 160 bytes
Thanx squid for -9 bytes :)
```
def p(s):n=s.count('1');return(n>1)*all(n%i for i in range(2,n))
def f(s):t=[f'{ord(c):07b}'for c in s];return all(map(p,t+[[u[j]for u in t]for j in range(7)]))
```
[Try it online!](https://tio.run/##dZJRb4IwFIXf@RU3mqXtRKfbg4kLS5zbossSfTDZA/JQoCCKLYF2UQm/3VGY2SDZW/vdc09vzm1yklvBHy4XnwWQ4IxMuJUNPKG4xGiEyGPKpEo55k8jckvjGPObCAKRQgQRh5TykOF7kxNiaINAG0jLDlAuUh97ZDIcuwXSek/rM@fHD7TVgSY4MWXPtpW9c7RIaZGsjrtf/zFxCLl4NGMZWGAbABi5jJ3PyIQ3GmeMmDVTnJ9Ktk7VFW1V5lLuN@F8uX6nX7QJZ8vDiq4Xz4uP12ZhqtbD@XS2b9LVavbZet4TPuuHIg5afNbrtcjd/qVF5osWmP65O4ahE8E6ARPYMWGeZD7RAVWhTMoO6klF4zKeoJKREiVpVC4x6OSo30P2tc2yaqlTQK6VxQQ28lqE/HoqTAiFhLwWFx1t2K0d0YajwU5EHP@35moCAl1gnLoxAynqYcCN5IHKNDpWX8hnrgrDiIeXbw "Python 3 ‚Äì Try It Online")
[Answer]
# [K (oK)](https://github.com/JohnEarnest/ok), ~~40~~ 33 bytes
**Solution:**
```
&/{2=+/d=_d:x%!x}'+/'m,+m:(7#2)\'
```
[Try it online!](https://tio.run/##y9bNz/7/X02/2shWWz/FNj7FqkJVsaJWXVtfPVdHO9dKw1zZSDNGXSmjtDgpMS9F6f9/AA "K (oK) ‚Äì Try It Online")
**Explanation:**
Half is creating the matrix, the other half is the primality check.
```
&/{2=+/d=_d:x%!x}'+/'m,+m:(7#2)\' / the solution
                                ' / apply to each (')
                               \  / decode
                          (   )   / do this together
                           7#2    / 7#2 => 2 2 2 2 2 2 2
                        m:        / save as m
                       +          / transpose
                     m,           / append to m
                  +/'             / sum (+/) each (')
                 '                / apply to each
  {             }                 / lambda taking implicit x
              !x                  / range 0..x
            x%                    / x divided by ...
          d:                      / save as d
         _                        / floor
       d=                         / equal to d?
     +/                           / sum (+/)
   2=                             / equal to 2?
&/                                / minimum
```
[Answer]
# PHP, 173 bytes
```
for($r=1;$b=substr_count($t[$i]=sprintf('%07b',ord($argv[1][$i++])),1);)$r&=$b==2|$b%2&$b>2;for(;$k++<7;){for($b=$j=0;$t[++$j];$b+=$t[$j][$k-1]);$r&=$b==2|$b%2&$b>2;}echo$r;
```
[Test it online](http://sandbox.onlinephpfunctions.com/code/9a9a428d15fdc6022ac95375b2168a15862ddaf6)
[Answer]
# JavaScript, 234 bytes
```
f=z=>(z=[...z].map(v=>v.charCodeAt(0))).map(v=>v.toString(2).replace(/0/g,"").length).every((p=v=>{for(i=2;i<v;i++){if(v%i===0){return 0}};return v>1}))&&[...""+1e6].map((v,i)=>z.reduce((a,e)=>!!(e&Math.pow(2,i))+a,0)).every(v=>p(v))
```
We get the horizontal values by converting the number to binary, removing the zeros using a string replacement, and then counting the 1s.
The vertical sums are obtained by looping 1 to 7 and using a bitwise AND with 2 raised to the nth power.
[Answer]
## Clojure, 180 bytes
```
#(let[S(for[i %](for[j[1 2 4 8 16 32 64]](min(bit-and(int i)j)1)))A apply](not-any?(fn[i](or(= i 1)(seq(for[d(range 2 i):when(=(mod i d)0)]d))))(into(for[s S](A + s))(A map + S))))
```
There might be a shorter way of generating bit lists and also the primality test.
[Answer]
# [Perl 5](https://www.perl.org/) `-MList::Util=all,sum -pF`, ~~96~~ 92 bytes
```
$_=all{//;all{$'%$_}2..$_-1}(map{$_=sprintf'%07b',ord;y/1//}@F),map{sum map{s/.//;$&}@F}0..6
```
[Try it online!](https://tio.run/##HY67CsIwAEX3foVDahXSPIQqtAiC0EmhiziGhioG0iQk6VBKft2YOp3hHg7XvKysYgTs3Eu5YNysAEUOWDggBFhJw27szZIEZ6xQ/l3k5MQLqO3QzJhiHC7tHq6Km8bNnxilDtimIRCEjjF@Jsd7NWR8UmrOuu76/GrjhVYulvcKEUoSb8L5un54IdcrMNViaWT7Aw "Perl 5 ‚Äì Try It Online")
[Answer]
# Python 3, 164 bytes
```
import numpy;a=numpy.array([list(f'{ord(_):07b}')for _ in input()]).astype(int);print(all([(v>1)*all(v%i for i in range(2,v))for v in set(a.sum(0))|set(a.sum(1))]))
```
[Answer]
# Ruby 2.7 `-rprime`, 95 bytes
```
->s{a=s.bytes.map{[*@1.digits(2),0][..6]}
(a.map(&:sum)+a.transpose.map(&:sum)).all?(&:prime?)}
```
No TiO link because TiO still runs Ruby 2.5.5. üò≠
## Explanation
Pretty simple. The first line gets the binary digits of each character as an array padded out to seven digits, which *really* ought to be easier:
```
a = s.bytes.map { [*@1.digits(2), 0][..6] }
```
Check out that numbered block parameter (`@1`) and beginless range (`..6`) [hotness](https://codegolf.stackexchange.com/a/187015/11261).
The second line sums the rows and columns and tests if they're all prime:
```
(a.map(&:sum) + a.transpose.map(&:sum)).all?(&:prime?)
```
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), ~~149~~ ~~146~~ ... ~~134~~ ~~130~~ 129 bytes
```
x=>[...x].map(y=>a=[...a.map(n=>y.charCodeAt()&2**i++?++z&&-~n:n,z=i=0),z],a=[...Array(7)])&&!a.some(n=>(P=r=>n%--r?P(r):~-r)(n))
```
[Try it online!](https://tio.run/##bVBNT4MwGL77LySRtCutsKnTJWVBNBnGBA4kHgyHjsGGg5YUMIPD/joyvZn39j4f79fzJb5Fk@qibqlUu2zM@Xji7idj7JSwStSo567gFyx@oeRuz9KD0P7k9lqEzflsVhCyJmQwTXqWK2kNvOA2tobE@uv0tBY9WuIEm@a1YI2qssscFHHNXXlDqV5HSOPVmWqMJMZjqmSjyoyVao9yZGw7KXsD46t//KFrtkLuAGUTxm/TY4Dih1Uk4uA5eH8FVK@L7Y3nHwEpivwPgE6nGOhelTm0ixCAvT2@QBcH0DkA58wXd/cPy8cnG6gAvx0aTGd1Jlrk2AsHT/H@AA "JavaScript (Node.js) ‚Äì Try It Online")
### Explanation
```
x=>                        // Main function:
 [...x].map(               //  For each y in x:
  y=>
   a=[...a.map(            //   For each i in range(0, len(a)):
    n=>                   
     y.charCodeAt()&2**i++ //    If y AND 2**i is not zero:
     ?++z&&-~n:n,          //     z = z + 1; a[i] = a[i] + 1 (1 if a[i] is undefined)
    z=i=0                  //   Initially z = 0
   ),z],                   //   Then push z at the end of a
  a=[...Array(7)]          //  Initially a = [undefined] * 7
 )&&!a.some(               //  Then for each n in a:
  n=>(
   P=r=>                   //   Composite function:
    n%--r?                 //    If n % (r - 1) == 0 or r == 1:
     P(r)                  //     Return P(r - 1)
    :~-r                   //    Else: Return r - 2
  )(n)                     //   Starting from r = n
 )                         //  Return whether the composite function returns 0 for all n.
```
### How does it even work!?
* `y.charCodeAt()&2**i`
	+ We need this code to return the corresponding bit of `y.charCodeAt()` if `0 <= i < 7`, and 0 otherwise.
	+ When `i < 7`, the code apparently works as usual.
	+ When `7 <= i <= 32`, since the corresponding bit of `y.charCodeAt()` is 0 anyway, the result is 0 as expected.
	+ When `32 < i < 1024`, since `int32(2**i) == 0`, the result is 0 as expected.
	+ When `1024 <= i`, we have `2**i == Infinity`, and since `int32(Infinity) == 0`, the result is 0 as expected.
* `(P=r=>n%--r?P(r):~-r)(n)`
	+ For simplicity we let `R = --r = r - 1`.
	+ This helper function terminates when `n % R == 0` or `n % R is NaN`.
		- `n % R == 0`: `R` is a factor of `n`.
			* If `R == 1`, then `n` is prime because all `1 < R < n` can't divide `n`. Return 0 (falsy).
			* If `R == -1`, then `n == 0`. Return -2 (truthy).
			* Otherwise, return `R - 1` where `R - 1 > 0` (truthy).
		- `n % R is NaN`: Invalid modular calculation.
			* If `R == 0`: `n == 1`. Return -1 (truthy).
			* If `n is NaN`: `R is NaN`. Return -1 (truthy).
	+ As a result, only when `R == 1` can this function return a falsy value, indicating `n` is prime.
]