Divisibility checks against prime numbers can all be accomplished with the same routine, applied recursively, consisting of add or subtract x times the last digit to or from the remaining number. For example, for 13, add four times the last digit to the rest:
For 17, subtract five times the last digit from the rest:
For 19, add two times the last digit to the rest:
And, for 11, subtract the last digit from the rest:
Write a function to return a true-false vector for the prime numbers in the 11:20 range ([11 13 17 19]) based on a number supplied as a string.
Restrictions on Java, mod, ceil, round, and floor are still in effect.