I am learning about the AODV (ad-hoc on-demand distance vector) protocol. I saw a "sequence number" with a value like "A 46"; however, I don't understand why incrementing this sequence number can prevent loops. Why does this help?
Mike's suggestion to read RFC 3561 - Ad hoc On-Demand Distance Vector (AODV) Routing should do the trick; in the meantime, I will go ahead and summarize it for you.
Wireless (routing) protocols, such as AODV protocols, use sequence numbers in a different way than wireline protocols do. AODV maintains a table of destination IP addresses, along with the last sequence number. This way, if it receives the same routing sequence number in an update, it detects the duplicate and drops the update; thus, avoiding a potential loop. Additionally, AODV does not forward/process update packets that it has seen before. The sending node (based on whatever message they send Route request, Route Reply), maintains their own sequence numbers and increments it before sending a new packet out.
AODV is hardly alone in depending upon sequence numbers to avoid loops; RFC 4728 - Dynamic Source Routing (DSR) also depends on sequence numbers. Yet another wireless (multicast) routing protocol that uses sequence number to avoid looping is IETF Draft - The Adaptive Demand-Driven Multicast Routing Protocol for Mobile Ad Hoc Networks (ADMR).
We should note that layer-2 in wireless networks (typically) do not use Spanning Tree Protocol (STP) for loop prevention.
Perkins, in his original paper on AODV, actually gives a mathematical proof of how sequence numbers can prevent loops. For details, see A. Proof of the Loop-free Property in Ad-hoc On-Demand Distance Vector Routing.