A111208 Number of primes <= n-th triangular number.
0, 0, 2, 3, 4, 6, 8, 9, 11, 14, 16, 18, 21, 24, 27, 30, 32, 36, 39, 42, 46, 50, 54, 58, 62, 66, 70, 74, 79, 84, 90, 94, 99, 102, 108, 114, 121, 126, 131, 137, 141, 149, 154, 160, 166, 174, 180, 188, 193, 200, 205, 216, 220, 226, 235, 242, 250, 259, 267, 274, 281, 290
Offset: 0
Keywords
Links
- Harry J. Smith, Table of n, a(n) for n = 0..10000
Programs
-
Haskell
a111208 n = length $ takeWhile (<= a000217 n) a000040_list -- Reinhard Zumkeller, Nov 01 2011
-
Mathematica
Table[PrimePi[n*(n + 1)/2], {n, 0, 60}] (* Ray Chandler, Oct 31 2005 *)
-
PARI
{ allocatemem(932245000); default(primelimit, 4294965247); write("b111208.txt", 0, " ", 0); for (n = 1, 10000, t=n*(n + 1)/2; a=primepi(t); write("b111208.txt", n, " ", a); ) } \\ Harry J. Smith, Mar 10 2009
-
Sage
[prime_pi(binomial(n,2)) for n in range(1, 63)] # Zerinvary Lajos, Jun 06 2009
Extensions
Extended by Ray Chandler and Alonso del Arte, Oct 31 2005
Comments