Can the relation of $a^{p} \equiv a\pmod {2p}$ if (p prime and p>2) be added to Fermat's little theorem? Fermat's little theorem
$a^{p} \equiv a\pmod p$  if p prime
I have noticed that  the formula $a^{p} \equiv a\pmod {2p}$  (p prime and p>2)   can be also  written by using Fermat's little theorem 
Proof:
Let $a$ be any integer and $p>2$ be some prime number.
$a^{p} \equiv a\pmod p$ 
$a^{p}-a \equiv 0\pmod p$ 
$a(a^{p-1}-1) \equiv 0\pmod p$
$a(a^{p-1}-1) \equiv 0\pmod p$ 
$F(a)=(a^{p-1}-1)$ can be divided to $(a-1)$ because $F(1)=(1^{p-1}-1)=0$
$F(a)=(a^{p-1}-1)=(a-1).R(a)$  //R(a) is polinom that has degree p-2 and coefficients are  Integer numbers.
$a (a-1) R(a)  \equiv 0\pmod p$  
$a (a-1)$  is always an even number so $a (a-1) R(a)$ will be always even number and also can be divided to $p$ because of Fermat's little theorem . Thus $a^{p} \equiv a\pmod {2p}$  if (p prime and p>2) .
I searched internet but I have not seen that relation in the internet.
Is it known formula?Please help if it is known relation(I would like to learn what the subject is )
Sorry if someone else asked the same question in here.
Thank you for answers and helps.
 A: You are correct I think, but the way you write it down makes it look more difficult than it is. Also you should be more specific on whether you are talking about one particular $a$ or "$\forall a$".
So let me show how I would write this down. First, let $a$ be any integer and $p>2$ be some prime number. Then 
$$ a^p \equiv a \pmod{2p} \iff 2p \mid a^p - a  \iff 2\mid a^{p}-a \text{ and } p\mid a^p-a$$
The last equivalence holds because $2$ and $p$ are two different primes. 
But $2\mid a^p-a$ for all $a$ and $p$: if $a$ is even, then clearly $a^p$ will be even as well; if $a$ is odd, then so is $a^p$ and hence $a^p-a$ will be even again. So this is indeed equivalent to
$$\dots \iff  p\mid a^p-a \iff a^p \equiv a \pmod p.$$
A: This is the special case $\rm\ m = 2\:p,\ p\:$ odd, of the following generalization of Fermat's little theorem, quoted from Bill Dubuque's post
THEOREM  $\ $ For naturals $\rm\: k,m>1 $
$\qquad\rm m\ |\ a^k-a\ $ for all $\rm\:a\in\mathbb N\ \iff\ m\:$ is squarefree and prime $\rm\: p\:|\:m\: \Rightarrow\: p-1\ |\ k-1 $
A: As Joel rightly observed :If $a$ is any integer, and $n$ a positive integer, then $a^n\equiv a \pmod2$
So : $a^p\equiv a \pmod2$ , and $a^p\equiv a \pmod p$
According to Chinese Remainder Theorem :
$a^p \equiv a \pmod { \operatorname{lcm} (2,p)} $
,and since $p$ is an odd prime it follows that : $\operatorname{lcm}(2,p) = 2p$ , therefore :
$a^p \equiv a \pmod {2p}$
