Out of all the years I've been making this challenge, 2017 is the first year that's been a prime number. So the question will be about prime numbers and their properties.
Your task is to produce a program or function that will take an arbitrarily large positive integer as input, and output or return whether or not the number is 2,017-friable — that is, whether the largest prime factor in that number is 2,017 or less.
Some example inputs and their outputs:
1 (has no prime factors) true 2 (= 2) true 80 (= 2 x 2 x 2 x 2 x 5) true 2017 (= 2017) true 2019 (= 3 x 673) true 2027 (= 2027) false 11111 (= 41 x 271) true 45183 (= 3 x 15061) false 102349 (= 13 x 7873) false 999999 (= 3 x 3 x 3 x 7 x 11 x 13 x 37) true 1234567 (= 127 x 9721) false 4068289 (= 2017 x 2017) true
Your program does not have to literally output
false — any truthy or falsy values, and in fact any two different outputs that are consistent across true and false cases are fine.
However, you may not use any primes in your source code. Primes come in two types:
Characters, or sequences of characters, that represent prime number literals.
7are illegal in languages where numbers are valid tokens.
141is illegal because it contains
41, even though
4are otherwise valid.
d) are illegal in languages where they are typically used as 11 and 13, such as CJam or Befunge.
Characters that have prime-valued Unicode values, or contain prime-valued bytes in their encoding.
%)+/5;=CGIOSYaegkmqare illegal in ASCII, as well as the carriage return character.
óis illegal in UTF-8 because its encoding has
0xb3in it. However, in ISO-8859-1, its encoding is simply
0xf3, which is composite and therefore okay.
The shortest code to do the above in any language wins.