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.

Showing 1-9 of 9 results.

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 *)

A212213 Array read by antidiagonals: pi(n) + pi(k) - pi(n+k), where pi() = A000720.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 2, 1, 2, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 2, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0
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

			Array begins:
  0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, ...
  0, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, ...
  0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, ...
  0, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, ...
  0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
  1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, ...
  1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, ...
  ...
		

References

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

Crossrefs

Programs

  • Mathematica
    t[n_, k_] := PrimePi[n] + PrimePi[k] - PrimePi[n + k]; Table[t[n - k + 2, k], {n, 0, 15}, {k, 2, n}] // Flatten (* Jean-François Alcover, Dec 31 2012 *)

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

Original entry on oeis.org

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

Views

Author

Keywords

Comments

T(n,0)=0; for n > 0: T(n,1)=A010051(n); T(n,n)=-A060208(n). - Reinhard Zumkeller, Apr 15 2008
A212210-A212213 are the preferred versions of this array.

Examples

			Triangle begins
  0;
  0,  1;
  0,  1,  0;
  0,  0,  0, -1;
  0,  1,  0,  0,  0;
  0,  0,  0, -1, -1, -2;
  ...
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[PrimePi[n+k]-PrimePi[n]-PrimePi[k],{n,0,20},{k,0,n}]] (* Harvey P. Dale, Feb 22 2012 *)

Extensions

More terms from James Sellers, Dec 22 1999

A212212 Array read by antidiagonals: pi(n) + pi(k) - pi(n+k), where pi() = A000720.

Original entry on oeis.org

-1, -1, -1, 0, 0, 0, -1, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 2, 1, 2, 1, 2, 1, 0, -1, 0, 1, 1, 1, 1, 1, 1, 0, -1, 0, 0, 1, 1, 2, 1, 2, 1, 1, 0, 0, -1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, -1, 0, 0, 1, 0, 1, 1, 2, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 0
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.

Examples

			Array begins:
  -1, -1,  0, -1,  0, -1,  0,  0,  0, -1,  0, -1, ...
  -1,  0,  0,  0,  0,  0,  1,  1,  0,  0,  0,  0, ...
   0,  0,  1,  0,  1,  1,  2,  1,  1,  0,  1,  1, ...
  -1,  0,  0,  0,  1,  1,  1,  1,  0,  0,  1,  1, ...
   0,  0,  1,  1,  2,  1,  2,  1,  1,  1,  2,  1, ...
  -1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, ...
   0,  1,  2,  1,  2,  1,  2,  2,  2,  1,  2,  1, ...
   0,  1,  1,  1,  1,  1,  2,  2,  1,  1,  1,  1, ...
   ...
		

References

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

Crossrefs

Cf. A000720, A212210-A212213, A060208, A047885, A047886. First row and column are -A010051.

Programs

  • Mathematica
    a[n_, k_] := PrimePi[n] + PrimePi[k] - PrimePi[n+k]; Flatten[ Table[a[n-k, k], {n, 1, 15}, {k, 1, n-1}]] (* Jean-François Alcover, Jul 18 2012 *)

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 *)

A060207 Start at 2^n, iterate function PrimePi (A000720) until fixed point is reached; sequence gives number of steps.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22
Offset: 0

Views

Author

Labos Elemer, Mar 19 2001

Keywords

Comments

A007097(a(n) - 2) <= 2^n < A007097(a(n) - 1). - David Wasserman, May 31 2002

Examples

			n=24, the relevant list is: {16777216,1077871,84115,8198,1028,172,39,12,5,3,2,1,0}, its length a(24)=13.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[FixedPointList[PrimePi, 2^w]]-1, {w, 0, 32}]
    f[n_] := Length@ NestWhileList[ PrimePi, 2^n, # > 0 &]; Array[f, 48, 0] (* Robert G. Wilson v, Aug 12 2011 *)
  • PARI
    a(n) = {my(c=2, k=2^n); while(k=primepi(k), c++); c; } \\ Jinyuan Wang, May 16 2020

Extensions

More terms from David Wasserman, May 31 2002

A060303 Number of primes below n^2 does not exceed n times the number of primes below n.

Original entry on oeis.org

0, 0, 2, 2, 6, 7, 13, 14, 14, 15, 25, 26, 39, 40, 42, 42, 58, 60, 80, 82, 83, 84, 108, 111, 111, 112, 114, 115, 144, 146, 179, 180, 182, 183, 185, 186, 225, 228, 228, 229, 270, 272, 319, 321, 324, 325, 376, 378, 378, 383, 387, 387, 439, 443, 446, 451, 455, 454
Offset: 1

Views

Author

Labos Elemer, Mar 26 2001

Keywords

Examples

			pi(100) = 25, 10*pi(10) = 40, a(10) = 40-25 = 15.
		

Crossrefs

Formula

Table[n*PrimePi[n]-PrimePi[n^2], {n, 1, 100}]

Extensions

Offset corrected by Amiram Eldar, Sep 06 2024

A060304 Number of primes below n^3 does not exceed n times the number of primes below n^2.

Original entry on oeis.org

0, 0, 3, 6, 15, 19, 37, 47, 69, 82, 113, 139, 180, 216, 244, 300, 381, 423, 486, 553, 638, 726, 820, 887, 1029, 1152, 1256, 1376, 1527, 1659, 1794, 1992, 2156, 2357, 2517, 2739, 2909, 3085, 3365, 3627, 3933, 4200, 4380, 4687, 4960, 5313, 5547, 5917, 6395
Offset: 0

Views

Author

Labos Elemer, Mar 26 2001

Keywords

Examples

			n=10, 10*pi(100)=250, pi(1000)=168, a(10)=250-168=82.
		

Crossrefs

Programs

  • Mathematica
    Table[n*PrimePi[n^2]-PrimePi[n^3], {n, 1, 100}]

Formula

a(n) = n*pi(n*n) - pi(n*n*n). - Jonathan Sondow, Feb 17 2014
a(n) = n*A038107(n) - A038098(n). - Michel Marcus, Feb 17 2014

A259922 a(n)= Sum_{2 < prime p <= n} c_p - Sum_{n < prime p < 2*n} c_p, where 2^c_p is the greatest power of 2 dividing p-1.

Original entry on oeis.org

0, -1, -1, -2, 2, 1, 1, 1, -3, -4, -2, -3, 1, 1, -1, -2, 6, 6, 6, 6, 3, 2, 4, 3, 3, 3, 1, 1, 5, 4, 4, 4, 4, 3, 3, 2, 3, 3, 3, 2, 8, 7, 9, 9, 6, 6, 8, 8, 3, 3, 1, 0, 4, 3, 1, 1, -3, -3, -1, -1, 3, 3, 3, 2, 2, 1, 3, 3, 0, -1, 1, 1, 7, 7, 5, 4, 4, 4, 4, 4, 4, 3
Offset: 1

Views

Author

Vladimir Shevelev, Jul 09 2015

Keywords

Comments

It is known that, for n>10, pi(2*n) < 2*pi(n), where pi(n) is the number of primes not exceeding n (A000720). Thus, for n>10, in the interval (1,n] we have more primes than in the interval (n,2*n).
In connection with this, it is natural to conjecture that there exists a number N such that a(n)>0 for all n >= N.

Crossrefs

Programs

  • Mathematica
    Map[Total[Flatten[Map[IntegerExponent[Select[#,PrimeQ]-1,2]&,{Range[3,#],Range[#+1,2#-1]}]{1,-1}]]&,Range[50]]

Extensions

More terms from Peter J. C. Moses, Jul 09 2015
Showing 1-9 of 9 results.