How are the powers being changed I have a semigroup $S$ including a generator, say $d$, such that $$d^4=d$$ I am trying to guess the general rule of $d$'s powers such that when I want to calculate $d^n, n\in\mathbb N$; I can simplify it to a reduced possible power(s).

Obviously, I have: $$(*)~~d=d^4=d^7=d^{10}=d^{13}=...\\(**)~~d^2=d^5=d^8=d^{11}=d^{14}=...\\(***)~~d^3=d^6=d^9=d^{12}=d^{15}=...$$ and checking the powers with OEIS was useless to give me any proper rules for each cases above. For example, what is $d^{33}$? I just could write it as the following to find out that; it is $d^3$: $$d^{33}=d\cdot d^{32}=d\cdot(d^4)^8=d\cdot(d^4)^2=d\cdot d^2=d^3$$
Can we say: 
The OEIS couldn't find any matchable sequences to rule the powers, so my question does not make any senses.
Thanks for your time and your any help.
 A: If $m\equiv n\pmod{3}$, then $d^m=d^n$. Or, in terms of remainders, $d^n=d^k$, where $k-1$ is the remainder when $n-1$ is divided by $3$.
A: $d$ generates in $S$ a subgroup with the unity $d^3$. So $d^n=d^{n\pmod{3}}$.
A: I'll just write something about the general case.  An element $d$ of a semigroup is said to have finite order if $d^i = d^{i+k}$ for some $i,k\in \mathbb{N}$.  In groups this reduces to $d^k=1$ and then, if $k$ is minimal, the distinct powers of $d$ are $1,d,\ldots,d^{k-1}$ and for any $m\in \mathbb{N}$ we have $d^m = d^r$, where $r$ is the remainder upon dividing $m$ by $k$.  (You already know this I'm sure.)
In semigroups, the minimal such $i$ and $k$ are called the index and period respectively.  If $i$ and $k$ are minimal, then the distinct powers of $d$ are $d,\ldots,d^{i+k-1}$.  Note that the powers $d,\ldots,d^{i-1}$ 'never occur again' (that is, no higher powers are equal to them).  The elements $d^i,\ldots,d^{i+k-1}$ form a group (exercise: find the identity element - it's not necessarily $d^k$, because we might have $k<i$), and we have $d^{i+m} = d^{i+n}$ iff $m\equiv n \pmod k$.
