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.
1Is "primis" the correct adjective in Latin, though? After all, its primary meaning is "first", so it's at best ambiguous. I'd prefer an adjective meaning "irreducible". Jan 24, 2020 at 21:33
5@CMonsour: It is the one which has been historically used. Euler wrote De Numeris Primis valde Magnis for example. Jan 24, 2020 at 21:37
1On the other hand, I just verified that Gauss used "primis", so I guess that is best after all. Jan 24, 2020 at 21:49
2@CMonsour: Yes, as I said: Gauss, Euler and every other mathematician who wrote about primes in Latin. Jan 24, 2020 at 21:51
1@tony: It is a hanging infinitive, and the action itself of playing is the subject - the corresponding verb is simply implied. Just like you can think of the subtitle "Playing with prime numbers" as a truncation of "The theme of this website is playing with prime numbers". Jan 28, 2020 at 19:43