I noticed some older CPUs are branded as Pentium(n) (Pentium followed by a number), but there's some relatively new computers on shelves that just say Pentium with no number. Are those processors similar or do they just share the name?
Short answer: yes, there is a difference. They're all part of the x86 lineup though, and post i486 they were a marketing name for Intel chips.
In the early days of computing, IBM wanted multiple sources for their chips. Intel allowed AMD to make some 386 chips. When the 486 came out, clones were big enough that Intel didn't need worry about IBM as much, and also didn't want to share the pie with AMD. They started calling their chips i486, and tried to get a trademark on i486. The courts laughed at them (going to trademark a letter?). So Intel tried to come up with a marketing name.
Therefore was born the trademarkable name Pentium. The root, Penta, meaning 5. This was their 586. There were other 586s, including Cyrix's 5x86, who had in some ways a more advanced micro-architecture (the 5x86 broke down x86 instructions to RISC like micro-ops, much like how chips do now).
So, that was 586, what do we name the next gen? The new 686.... Sextium? Obviously bad. Hexium? Gonna have Hex in a name? Not gonna go there.
So they went to the name Pentium Pro. Their first 686 was an extension of a marketing name for 5th gen 586. The next one after that? Well, Pentium II. Then Pentium III, all these are 686 architectures.
Then, they went to Pentium 4. Why 4? Dunno, maybe they didn't like choosing between IV, or IIII.
This was a new generation, essentially their 786. They went all-in on the MHz race and made a new clock friendly architecture, called Netburst. Very very deep pipelines, but it didn't perform well. If those pipelines stalled (and not if, but when they stalled) you spent a lot of time trying to empty then refill them. For CPU power for watt, it didn't work as well as the Pentium M, which was a Pentium III based product. Intel kind of backtracked, didn't follow the Netburst line much after that, though some other Pentium 4 features were added to the other chips.
Soon after, they started new marketing names, like Centrino, and Core, Core Duo et. al.
So, the original Pentium naming scheme stretches 3 distinct generations of x86:
So, if you see something named Pentium, and it's in the single digit megabytes of RAM, and double digit megabytes hard drive space, it may be an original Pentium.
Anything more recent than this is using Pentium as a pure marketing name. Since Pentium is trademarked you're essentially calling it "an Intel x86 computer". More recent chips are well past Pentium 4 in architecture - Pentium is a brand only now, connoting Intel Inside and giving no more info than that. The current uses of "Pentium" as a brand name seem to be on the lower end. Anything that is Core series or i3,5,7 series gets listed as that, anything left over may get Pentium.
Intel couldn't trademark 80486, because you can't trademark a number. Intel had been using numbers for sometime, 4004, 8008, 8080, 8086, 8088, 80186, 80286, 80386 and 80486. However a combination of numbers and letters can be trademarked. Other companies were selling processors using 80486 and 486 nomenclature and Intel wanted to differentiate theirs hence the i486, which is/was trademarked. Subsequently they ditched the numeric only naming so as to keep theirs separate and further protect their trademarks.