A212210 Triangle read by rows: T(n,k) = pi(n) + pi(k) - pi(n+k), n >= 1, 1 <= k <= n, where pi() = A000720().
-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
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.
Links
- Reinhard Zumkeller, Rows n = 1..150 of triangle, flattened
- P. Erdos and J. L. Selfridge, Complete prime subsets of consecutive integers. Proceedings of the Manitoba Conference on Numerical Mathematics (Univ. Manitoba, Winnipeg, Man., 1971), pp. 1--14. Dept. Comput. Sci., Univ. Manitoba, Winnipeg, Man., 1971. MR0337828 (49 #2597).
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 *)
Comments