3 ms·
> Define the sequence k(1)=0, k(2)=2, k(3)=3, k(n)=k(n-2)+k(n-3), and for n>1 ask: Does n divide k(n)? The answer is always "Yes" if n is prime, and almost alwa
by jibiki 18y ago
> Define the sequence k(1)=0, k(2)=2, k(3)=3, k(n)=k(n-2)+k(n-3), and for n>1 ask: Does n divide k(n)? The answer is always "Yes" if n is prime, and almost always "No" if n is composite.
I can see why this is true for primes where x^3 + x^2 - 1 = 0 has a solution mod p (because then you can find a closed form for the recurrence mod p.) But I have no idea how to do it in general (it looks like a generalization of Fermat's little theorem.)