Let $(G,*)$ is a finite group, whose order is $n$. Also let $p|n$ and $p\in P$. Can you bring an example of such group which doesn't have an element of order $p$.
Sincerely,
Let $(G,*)$ is a finite group, whose order is $n$. Also let $p|n$ and $p\in P$. Can you bring an example of such group which doesn't have an element of order $p$.
Sincerely,
Proposition: A positive integer n > 1 is prime if and only if every finite group whose order is divisible by n contains an element of order n.
Proof: If n is prime, then Cauchy's theorem guarantees an element of order n in any group whose order is divisible by n. If n is not prime, then n must be divisible by at least two primes, so that n = dpq. We consider three cases: (1) p = q, (2) p divides q−1, and (3) p < q. In the first two cases we find a group of order exactly n with no element of order n, but in the third case we merely find a group whose order is divisible by n with no element of order n. (1) If n is divisible by the square of a prime p, then n = dp2 and the group Cd×Cp×Cp has order divisible by (and exactly equal to) n, but contains no elements of order n. (2) If n = dpq is divisible by a product of distinct primes p, q such that p divides q−1 but such that neither p nor q divides d, then the group Cd×(Cp⋉Cq) has order divisible by (and exactly equal to) n, but contains no element of order n. (3) More generally, if n = dpq where p < q are primes that do not divide d, then the group Cd×Sym(q) has order divisible by (but not equal to) n and has no element of order n.
In the third case, if d = 1 but p does not divide q−1, then every group of order (exactly equal to) n = dpq has an element of order n, so the larger group is necessary in case d = 1 at least (and so necessary for this simple proof that "ignores" d).
The groups: I believe the properties of the example groups used are well known, but I state them explicitly here:
Cn is the (unique up to isomorphism) cyclic group of order n. It has elements of order k exactly when k divides n.
If p, q are primes with p dividing q−1 then Cp⋉Cq is the (unique up to isomorphism) non-abelian group of order pq. It has a unique Sylow q-subgroup of order q, and it has q Sylow p-subgroups, so that every element is either the identity, an element of order q, or an element of order p.
Sym( q ) is the symmetric group on q points and every element of order q is a q-cycle. It has no elements of order dq for any d ≥ 2 (since their dth power is a q-cycle, they themselves must be a q-cycle, a contradiction), in particular, no elements of order pq.
Cd × G has elements of order k exactly when there are positive integers i, j such that k = ij, i divides d, i is coprime to j, and j is the order of an element of G.
One will not be able to find an example, because Cauchy's Theorem ensures there certainly is such an element.
As Ragib said, Cauchy's Theorem assures that if $p$ is a prime divisor of the order of the finite group $G$, then there is an element $g\in G$ of order $p$, hence at least $p-1$ of them. One may note that the proof of Cauchy Theorem's relies on a counting elements argument, thus it is not constructive.
In the comments, the questioner extended his question to elements of power prime order. Sylow's Theorems say that if $p^k$ is the highest power of the prime $p$ dividing the order of $G$, then there exists a subgroup $P
Now, in order to decide about the existence of elements of order $p^k$ is enough to consider just one $p$-sylow and decide whether it needs to be cyclic (because by the Sylow's Theorems again all $p$-sylows are conjugated inside $G$, hence isomorphic one to another).
To answer (in the negative) to the general question it is enough to observe that in the permutation group on $10$ elements, a $5$-sylow has $25$ elements and one such is the subgroup $ P=\langle(1\ 2\ 3\ 4\ 5)\rangle\times\langle(6\ 7\ 8\ 9\ 10)\rangle $ which is visibly non-cyclic.
Of course, one can come up with many more counterexamples, some of which much simpler than the one described above.