for RAM I think having 4 GB of RAM dedicate at the server process (thus the server.jar) would probably be enough thus assuming you want the absolute minimum and go with windows you need to buy a computer that has 6 GB of RAM (4 for the server, 2 for the OS). However, I personally would go with a computer that has at least 8 GB of RAM this way you have some extra room to play with in case you want to give the server some extra functions (for example use it as a backup server or let it host a website)
as for the CPU Single core performance is more important then the amount of cores, a nice quad core CPU will be more then enough assuming it has a high clock speed.
if you can afford it go with an SSD instead of an HDD as it will likely improve the loading of chunks and starting it up (assuming nothing else is the bottleneck). However in my experience this isn't as important as the CPU and RAM