By Fermat's little theorem we know that
$$b^{p1}=1 \mod p$$
if p is prime and $\gcd(b,p)=1$. On the other hand, I was wondering whether
$$b^{n1}=1 \mod n$$
can occur at all?
Update: sorry, I meant n odd. Please excuse.
By Fermat's little theorem we know that $$b^{p1}=1 \mod p$$ if p is prime and $\gcd(b,p)=1$. On the other hand, I was wondering whether $$b^{n1}=1 \mod n$$ can occur at all? Update: sorry, I meant n odd. Please excuse. 


There are no solutions to $b^{n1}\equiv1\pmod n$ with $n$ odd. Let $n>1$ be odd. Every prime dividing $n$ can be written as $2^km+1$ for some positive $k$ and some odd integer $m$. Among those primes, let $p$ have the minimal value of $k$. Then $n1=2^kr$ for some integer $r$. If $b^{n1}\equiv1\pmod n$ then $b^{n1}\equiv1\pmod p$ so $b^{(n1)m}\equiv(1)^m\equiv1\pmod p$ and $\gcd(b,p)=1$. But $b^{(n1)m}=b^{2^kmr}=b^{(p1)r}\equiv1\pmod p$ by little Fermat. Contradiction, QED. 


It's clear that b = n1 with n even gives a solution. But there are many other solutions. Here are the solutions $(b,n)$ not of the form $(2k1, 2k)$, with n less than or equal to 200, from MAPLE.
For example, $3^{281} \equiv 1 \mod 28$, so the pair [3,28] is on the list. I can't make sense of this output myself, but maybe someone else can? 


That would be equivalent to $2(n1) = k\varphi(n)$ and $n1\ne k'\varphi(n)$ by Fermat's little theorem for composite numbers. The second condition is equivalent to being able to satisfy first with $k$ odd, so we could try $k = 3$. Thus we have $n = 3n' +1$ and $2n' = \varphi(3n' + 1)$. Now the trivial choice for $n' =1$ works! Thus we find $n = 4$: $$(1)^{(41)} = 1 (\mathop{\text{mod}} 4).$$ 


This is something that brute force can answer: In[1]:= Reap[Do[ If[Mod[PowerMod[a, n  1, n] + 1 , n] == 0, Sow[{a, n}]], {n, 2, 20}, {a, 1, n  1} ]][[2, 1]] Out[1]= {{1, 2}, {3, 4}, {5, 6}, {7, 8}, {9, 10}, {11, 12}, {13, 14}, {15, 16}, {17, 18}, {19, 20}} (This lists the pairs $(b,n)$ for $n$ at most 20) 

