A294509 a(n) is the least value of pi(n*m) - pi(n)*pi(m) for any positive m <= n.
0, 1, 0, 1, 0, 1, -1, 0, 1, 2, 1, 1, 0, 1, 2, 3, 1, 2, 0, 1, 2, 2, 1, 2, 3, 3, 4, 5, 3, 4, 2, 2, 3, 4, 5, 6, 5, 6, 6, 6, 4, 4, 3, 4, 4, 5, 4, 4, 4, 5, 6, 6, 5, 5, 6, 7, 7, 8, 6, 7, 6, 6, 6, 7, 8, 9, 8, 8, 8, 8, 7, 7, 5, 5, 6, 7, 8, 9, 7, 8, 9, 9, 7, 8, 8, 9, 9, 10, 8, 9, 10, 10, 11, 12, 13, 13, 11, 12, 12, 12, 10, 10, 9, 10, 11
Offset: 1
Keywords
Examples
a(13) = 0 since 0 is the least value in the 13th row of A294508.
Links
- Robert Israel, Table of n, a(n) for n = 1..5000
Programs
-
Maple
f:= n -> min(seq(numtheory:-pi(n*m)-numtheory:-pi(n)*numtheory:-pi(m), m=1..n)): map(f, [$1..200]); # Robert Israel, Nov 08 2017
-
Mathematica
t[n_, m_] := PrimePi[n*m] - PrimePi[n]*PrimePi[m]; Min @@@ Table[ t[n, m], {n, 100}, {m, n}]
-
PARI
a(n) = vecmin(vector(n, m, primepi(n*m) - primepi(n)*primepi(m))); \\ Michel Marcus, Nov 08 2017
Comments