Bijection between the free homotopy classes $[S^{n},X]$ and the orbit space $\pi_n/\pi_1$ I would like to prove that there is a bijection between the free homotopy classes  $[S^{n},X]$ and the orbit space $\pi_{n}(X,x_{0}) / \pi_{1}(X,x_{0})$ where the action of $\pi_{1}(X,x_{0})$ over $\pi_{n}(X,x_{0})$ is the usual one. Is there any short proof for that?

Context:
  
  
*
  
*$\pi_n(X,x_0)$ (in particular when $n = 1$) is the $n$th homotopy group, and can be seen as the set of maps $S^n \to X$ that map the base point of $S^n$ to $x_0$, up to homotopy, where the homotopies preserve the base points.
  
*$[S^n, X]$ is the set of maps $S^n \to X$ up to homotopy, where the homotopies don't necessarily preserve the base point.
  
*The action of $\pi_1(X,x_0)$ on $\pi_n(X,x_0)$ is given as follows: pinch $S^n$ to get $S^n \to S^n \vee S^n$, and collapse the latitudes of the first factor to get $S^n \to [0,1] \vee S^n$. Then given $[\gamma] \in \pi_1(X,x_0)$ and $[f] \in \pi_n(X,x_0)$, $[\gamma] \cdot [f]$ can be seen as the composition of $S^n \to [0,1] \vee S^n$ and the concatenation of $\gamma$ (on $[0,1]$ and $f$ (on $S^n$).
  

 A: Suppose $X$ is path-connected, otherwise the result is clearly false*. Let $* \in S^n$ be the base point. For simplicity let $\pi_n := \pi_n(X,x_0)$ and $\pi_1 := \pi_1(X,x_0)$.
Let $\varphi : [S^n, X] \to \pi_n / \pi_1$ be the map defined as follows. Suppose $[f] \in [S^n, X]$ is a map, and choose a path $\gamma : I \to X$ from $x_0$ to $f(*)$. "Concatenate" $\gamma$ and $f$ (as you do when you define the action of $\pi_1$ on $\pi_n$) to obtain an element of $\pi_n$, and consider its class modulo the action of $\pi_1$ to get $[\gamma \cdot f] \in \pi_n / \pi_1$. It thus becomes independent of the choice of $\gamma$, and it is also independent of the choice of $f$ up to homotopy. Define $\varphi([f]) = [\gamma \cdot f] \in \pi_n / \pi_1$.
In the converse direction, let $\psi' : \pi_n \to [S^n, X]$ be the "forgetful" map that takes a based homotopy class to a free homotopy class (it's clearly well-defined). It is clear that if two based homotopy classes are in the same orbit for the action of $\pi_1$, then they will be in the same free homotopy class, thus $\psi'$ factors through the action of $\pi_1$ and you get a well-defined map $\psi : \pi_n / \pi_1 \to [S^n, X]$.
Now $\varphi$ and $\psi$ are inverse to each other. Let $[f] \in [S^n, X]$ and let $\gamma$ be a path from $x_0$ to $f(*)$. Then $\psi \circ \varphi([f]) = [\gamma \cdot f]$ seen as a free homotopy class; but since this is a free homotopy class you can just "retract" $\gamma$ so that $[\gamma \cdot f] = [f] \in [S^n, X]$. Conversely, if $[f] \in \pi_n / \pi_1$, then $f(*) = x_0$ and you see immediately that $\varphi \circ \psi([f]) = [f]$ by definition. In conclusion,
$$[S^n, X] \cong \pi_n / \pi_1.$$

* For a trivial counterexample, consider $X = \{x_0, x_1\}$ a discrete doubleton. Then $\pi_n / \pi_1$ is a singleton (because of base-point requirements), but $[S^n, X]$ is a doubleton.
Remark. This is a generalization of this question that deals with the case $n=1$.
