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.

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

Original entry on oeis.org

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

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.
A006093 gives row numbers of rows containing at least one negative term. [Reinhard Zumkeller, May 05 2012]

Examples

			Triangle begins:
  -1
  -1 0
   0 0 1
  -1 0 0 0
   0 0 1 1 2
  -1 0 1 1 1 1
   0 1 2 1 2 1 2
   0 1 1 1 1 1 2 2
   0 0 1 0 1 1 2 1 1
  -1 0 0 0 1 1 1 1 0 0
  ...
		

References

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

Crossrefs

Programs

  • Haskell
    import Data.List (inits, tails)
    a212210 n k = a212210_tabl !! (n-1) !! (k-1)
    a212210_row n = a212210_tabl !! (n-1)
    a212210_tabl = f $ tail $ zip (inits pis) (tails pis) where
       f ((xs,ys) : zss) = (zipWith (-) (map (+ last xs) (xs)) ys) : f zss
       pis = a000720_list
    -- Reinhard Zumkeller, May 04 2012
  • Mathematica
    t[n_, k_] := PrimePi[n] + PrimePi[k] - PrimePi[n + k]; Table[t[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Oct 17 2012 *)