Project Euler #225: Tribonacci non-divisors

  • + 0 comments

    Hints:

    1. What is 'S mod N' when N is a divisor of S?

    2. Learn that modulo arithmetic means: (a + b + c) mod N == (a mod N + b mod N + c mod N) mod N

    3. Do you need to calculate the full values of large tribonacci numbers?

    4. A non-divisor cannot go on forever without repeating. Can you detect a cycle?

    Let me know if these give away too much!