Joe is either a knight, a liar, or a knave. His favorite number is an integer between 1 and 1000. He makes the following statements about his favorite number:

1. It is odd.
2. It is divisible by 7.
3. It is divisible by 23.
4. It is not divisible by 19.
5. It has an even number of divisors.
6. It ends in 9.

What type is Joe, and what is his favorite number?

Suppose Joe is a knight. Then, his favorite number is divisible by 7 and 23, so it is divisible by 161. It also ends in 9. The first multiple of 161 that ends in 9 is 1449. That is greater than 1000, so he is not a knight.

Suppose Joe is a liar. Then, his favorite number is even and divisible by 19, so it is divisible by 38. It also has an odd number of divisors, so it is a square. The first square that is divisible by 38 is 38^2=1444. That is greater than 1000, so he is not a liar. Therefore, Joe is a knave.

If Statement 1 is false, then Statement 6 is true. Then, it is an even number ending in 9, which is impossible. Therefore, Statement 1 is true, so 3 and 5 are true, and 2, 4, and 6 are false. Since 3 is true, it is divisible by 23. Since 4 is false, it is divisible by 19. Therefore, it is divisible by 19*23=437. The only odd multiple of 437 less than 1000 is 437. Therefore, Joe is a knave, and his favorite number is 437.