Led sequence prime, odd & even numbers

Due to 3 LEDS :
L1 // FOR ODD NUMBERS
L2 // FOR EVEN NUMBERS
L3 // FOR PRIME NUMBERS

in a RANGE = 0 to 60

LEDS should be HIGH when
PRIME & ODD;
PRIME & EVEN;
ODD;
EVEN;

Do you have a question?

Yeah, sorry, I mean,
if the number is even and prime; led 2 and 3 will light up while led 2 remains off, if for example the number is odd and prime, then should light up led 1 and 3 while led two remains off. Numbers can be even and prime, odd and prime, even or odd.

But you still aren't asking a question....

Well, bassically I'd like to know how to do it.

I think that I should do an if to know whether the number is prime and inside of it an else if instruction to know if it is a pair, but not sure.

Use % operator to see if it's even, that decides L1 vs L2. If it's 2, it's also prime.

Then if it's odd (apart from 2, all primes are odd) test it for primality.

I might even make an array of 60 elements and pre-calculate if the number is prime, and put a 1 in the element of it's prime and a 0 if not. Then use that to say if L3 should be on or not.

Thanks a lot, that make sense to me. Sorry for not being clear since the beggining.