Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
using System;usings=System.Console;using System.Linq;public classLinq;class P{public static void Main(string[]a){int n=int.Parse(Consoles.ReadLine());Console;s.WriteLineWrite(Stringstring.Join(",",Enumerable.Range(2,n*n).Where(x=>!Enumerable.Range(2,x-2).Any(y=>x%y<1)).Take(n)));}}
C#, 236 bytes
using System;using System.Linq;public class P{public static void Main(string[]a){int n=int.Parse(Console.ReadLine());Console.WriteLine(String.Join(",",Enumerable.Range(2,n*n).Where(x=>!Enumerable.Range(2,x-2).Any(y=>x%y<1)).Take(n)));}}
C#, 216 bytes
using s=System.Console;using System.Linq;class P{static void Main(string[]a){int n=int.Parse(s.ReadLine());s.Write(string.Join(",",Enumerable.Range(2,n*n).Where(x=>!Enumerable.Range(2,x-2).Any(y=>x%y<1)).Take(n)));}}
using System;using System.Linq;public class P{public static void Main(string[]a){int n=int.Parse(Console.ReadLine());Console.WriteLine(String.Join(",",Enumerable.Range(2,n*n).Where(x=>!Enumerable.Range(2,x-2).Any(y=>x%y<1)).Take(n)));}}