cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A212211 Triangle read by rows: T(n,k) = pi(n) + pi(k) - pi(n+k), n >= 2, 2 <= k <= n, where pi() = A000720().

Original entry on oeis.org

0, 0, 1, 0, 0, 0, 0, 1, 1, 2, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 0, 1, 0, 1, 1, 2, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 2, 1, 2, 1, 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 3
Offset: 2

Views

Author

N. J. A. Sloane, May 04 2012

Keywords

Comments

It is conjectured that pi(x) + pi(y) >= pi(x+y) for 1 < y <= x.

Examples

			Triangle begins:
  0,
  0, 1,
  0, 0, 0,
  0, 1, 1, 2,
  0, 1, 1, 1, 1,
  1, 2, 1, 2, 1, 2,
  1, 1, 1, 1, 1, 2, 2,
  0, 1, 0, 1, 1, 2, 1, 1,
  0, 0, 0, 1, 1, 1, 1, 0, 0,
  0, 1, 1, 2, 1, 2, 1, 1, 1, 2,
  0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  ...
		

References

  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section VII.5, p. 235.

Crossrefs

Programs

  • Haskell
    a212211 n k = a212211_tabl !! (n-2) !! (k-2)
    a212211_tabl = map a212211_row [2..]
    a212211_row n = zipWith (-)
       (map (+ a000720 n) $ take (n - 1) $ tail a000720_list)
       (drop (n + 1) a000720_list)
    -- Reinhard Zumkeller, May 04 2012
  • Mathematica
    t[n_, k_] := PrimePi[n] + PrimePi[k] - PrimePi[n+k]; Flatten[ Table[t[n, k], {n, 2, 13}, {k, 2, n}]] (* Jean-François Alcover, May 21 2012 *)