I'm building a website about prime numbers, and I want to put the following sentence: "playing with prime numbers" in Latin in the subtitle of the main page. Google Translate translation is: "ludens primum cum numero", but I'm not sure if it is correct. I guess it should be:"ludens cum prima numeri" .
If, as I believe, the sentence stands as the theme of the website you should use the infinitive ludere instead of the participle ludens. The latter means "who plays/is playing".
As for "with prime numbers", it is an adverb of means and in Latin (for inanimate objects) this is expressed by the simple ablative, which gives numeris primis.
All in all: Numeris primis ludere. Note that in principle you could put ludere first, but this seems more natural.