TITLE: Curious tautological pattern on"p->p"
QUESTION [9 upvotes]: I found something that boggles me ( I'm really a beginner in symbolic logic, so maybe it's very trivial).
I was practicing with truth-tables, and I found that:

"p->p" is a tautology
"(p->p)->p" is not a tautology.

I decided to go further, and:

"((p->p)->p)->p" is again a tautology, but

4."(((p->p)->p)->p)-> p" is not, and it keeps alternating. 
I checked with an online logic calculator, and it seems correct.
Now, do you know why is that? Is there any particular reason for this pattern?
Cheers

REPLY [2 votes]: I love @lemontree's explanation (and @Manx's terser version of the same point).  It may be useful to see the point in a different way, though:
$(p \rightarrow p) \rightarrow p$ is equivalent to $\neg (\neg p \lor p) \lor p$, which by one of De Morgan's laws is equivalent to $(\neg \neg p \,\&\, \neg p) \lor p$.  
That last expression is equivalent to $(p \,\&\, \neg p) \lor p$.  
The left disjunct of that expression is a contradiction, though; it's always false, so the truth value of the whole expression is the same as the truth value of $p$.
lemontree's answer shows that you can apply this conclusion to understand the longer expressions.
For example, $((p \rightarrow p) \rightarrow p) \rightarrow p$ embeds the original 3-$p$ expression on the left side of the arrow, and we saw that that was equivalent to $p$, so the whole expression is equivalent to $p \rightarrow p$.