A108309 Consider the triangle of odd numbers where the n-th row has the next n odd numbers. The sequence is the number of primes in the n-th row.
0, 2, 2, 3, 2, 3, 3, 4, 4, 5, 3, 4, 6, 4, 6, 6, 4, 6, 7, 6, 8, 7, 5, 8, 9, 8, 7, 8, 9, 8, 9, 10, 10, 8, 10, 12, 5, 12, 12, 13, 9, 11, 11, 9, 13, 14, 9, 14, 14, 10, 10, 19, 14, 12, 12, 12, 12, 16, 15, 16, 15, 13, 18, 16, 16, 12, 16, 17, 15, 16, 18, 14, 15, 20, 18, 19, 14, 19, 20, 18, 16
Offset: 1
Examples
Triangle begins: 1: 1 -> 0 primes, 2: 3,5 -> 2 primes, 3: 7,9,11 -> 2 primes, 4: 13,15,17,19 -> 3 primes.
Links
- T. D. Noe, Table of n, a(n) for n=1..10000
- Pierre CAMI, Table of n, a(n) and Floor(1/2+n/log(n))for n=1..10000
Programs
-
Haskell
a108309 = sum . (map a010051) . a176271_row -- Reinhard Zumkeller, May 24 2012
-
Maple
seq(numtheory:-pi(n^2+n-1)-numtheory:-pi(n^2-n),n=1..100); # Robert Israel, Sep 03 2014
-
Mathematica
f[n_] := PrimePi[n^2 + n - 1] - PrimePi[n^2 - n]; Table[f[n], {n, 81}] (* Ray Chandler, Jul 26 2005 *)
Extensions
Edited and extended by Ray Chandler, Jul 26 2005
Comments