login
Smallest prime > n(n+1)/2.
6

%I #15 Aug 23 2023 19:52:24

%S 2,2,5,7,11,17,23,29,37,47,59,67,79,97,107,127,137,157,173,191,211,

%T 233,257,277,307,331,353,379,409,439,467,499,541,563,599,631,673,709,

%U 743,787,821,863,907,947,991,1039,1087,1129,1181,1229,1277,1327,1381,1433,1487,1543

%N Smallest prime > n(n+1)/2.

%H Vincenzo Librandi, <a href="/A097050/b097050.txt">Table of n, a(n) for n = 0..1000</a>

%F a(n) = A151800(A000217(n)). - _Michel Marcus_, Nov 13 2015

%t NextPrime@Table[n(n+1)/2,{n,0,60}] (* _Vladimir Joseph Stephan Orlovsky_, Apr 11 2011 *)

%t NextPrime[Accumulate[Range[0,60]]] (* _Harvey P. Dale_, Aug 23 2023 *)

%o (PARI) a(n) = nextprime(n*(n+1)/2+1); \\ _Michel Marcus_, Nov 13 2015

%Y Cf. A000217, A151800.

%Y Cf. A060264. See A065383 for another version.

%K nonn

%O 0,1

%A _N. J. A. Sloane_, Sep 15 2004, Nov 21 2008