TITLE: Given $n\in \mathbb N$, is there a free module with a basis of size $m$, $\forall m\geq n$?
QUESTION [10 upvotes]: Exercise IV.2.12 of Hungerford's Algebra asks to show the following:
If $F$ is a free module over a ring with identity such that $F$ has a basis of finite 
cardinality $n > 1$ and another basis of cardinality $n + 1$, then $F$ has a basis of 
cardinality $m$ for every $m > n\ (m \in \mathbb N)$. 
This is easy to prove using induction and the fact that if $M$ is an $R$-module with a basis of size $n$, then $M\simeq\bigoplus_{k=1}^nR$ as $R$-modules.
My question is, 

for each $n\geq 1$ is there a ring $R$ with identity and a free $R$-module $M$ such that $M$ has a basis of size $m$ for all $m\geq n$ and $M$ does not have a basis of size $k$ for all $k<n$?

In another exercise of the same section the case $n=1$ is established as follows:
Let $K$ be a ring with identity and $F$ a free $K$-module with an infinite denumerable 
basis $\{ e_1,e_2,\ldots\}$. Put $R =$ Hom$_K(F,F)$. Then the author shows that $R$ has a basis of size $2$ as an $R$-module; namely $\{f_1,f_2\}$, where $f_1(e_{2n})=e_n, f(e_{2n-1})=0,f_2(e_{2n})=0,f(e_{2n-1})=e_n$, and of course $R$ has a basis of size $1$; $\{1_R\}$.
But I don't know what to do when $n\geq 2$.
I thank beforehand any help.

REPLY [2 votes]: The example you gave is the canonical example of a ring without Invariant Basis Number, and aside from that, I only know about one other family of rings produced with Leavitt path algebras.
I think I'm remembering right that their key feature that set them apart from the example you gave was that they could produce this $R^n\cong R^m$ behavior for prescribed $m,n\in \Bbb N$.
Check them out in Abrams and Anh's paper!

Added: Hmph, I guess I forgot that link wasn't accessible to everyone! Anyhow, I found a slideshow Gene made that will also do the trick.