tough assignment of prime numbers
I have an assignment which made me very confused!!!!:confused:
I hope to help me please .
Pirin sequence are similar to Fibonacci series but with the following rule:
p(n) = p(n-2) + p(n-3) ; p(0) = 3 , p(1) = 0 , p(2) = 2
they have a property (now fully proven) that if p(n) is divisible by n then n is prime number
(special cases exist).
Write a program that will check whether an input x is prime or not using this technique.
and it would be very nice to help me with an algorithm to solve this problem than a code(but code won't hurt :D).