The correct options are
A (n−1)24 if n is odd
B n(n−2)4 if n is even
If a, b, c are in A.P., then a and c both are even or both are odd.
Case - 1: If n is even.
The number of ways of selecting two even numbers, a and c is n2C2. Number of ways of selecting two odd numbers, a and c is n2C2.
Hence, number of ways is n2C2+ n2C2=2×n2(n2−1)2
=n(n−2)4
Case - 2: If n is odd.
The number of ways of selecting two odd numbers, a and c is (n+1)2C2. The number of ways of selecting two even numbers, a and c is (n−1)2C2.
Hence, number of ways is (n+1)2C2+ (n−1)2C2
=(n+12)[(n+12)−1]2+(n−12)[(n−12)−1]2
=18(n−1)[(n+1)+(n−3)]
=(n−1)24