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.

A206722 Parameters of Chebyshev function psi.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 3, 2, 1, 1, 3, 2, 1, 1, 3, 2, 1, 1, 1, 3, 2, 1, 1, 1, 3, 2, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 4, 2, 1, 1, 1, 1, 4, 2, 1, 1, 1, 1, 1, 4, 2, 1, 1, 1, 1, 1
Offset: 2

Views

Author

John W. Nicholson, Feb 11 2012

Keywords

Comments

a(x,n) is the exponent k such that prime(n)^k <= x and x < prime(n)^(k+1).
psi(x) = Sum_{p_n <= x} k*log(p_n), where a(x,n) = k is the unique integer such that p_n^k <= x but p_n^(k+1) > x.
Related to Firoozbakht's Conjecture (1982): p_n^(1/n) > p_(n+1)^(1/(n+1)) for all n >= 1.

Examples

			If x = 7, then 2^2, 3^1, 5^1, 7^1 <= x < 2^3, 3^2, 5^2, 7^2, respectively so k = 2, 1, 1, 1, respectively.
The table starts in row x=2 with columns n >= 1 as:
  1;
  1, 1;
  2, 1;
  2, 1, 1;
  2, 1, 1;
  2, 1, 1, 1;
  3, 1, 1, 1;
  3, 2, 1, 1;
  3, 2, 1, 1, 1;
		

Crossrefs

Columns: A000523 (n=1), A062153 (n=2).

Programs

  • Mathematica
    A206722[x_, n_] := Module[{p = Prime[n]}, For[k = 0, True, k++, If[p^(k+1) > x && p^k <= x, Return[k]]]];
    Table[DeleteCases[Table[A206722[x, n], {n, 1, 17}], 0], {x, 2, 20}] // Flatten (* Jean-François Alcover, Sep 15 2018, after R. J. Mathar *)
  • Maxima
    prime(n) := block(
        if n = 1 then
           return(2)
        else
        return(next_prime(prime(n-1)))
    )$ /* very slow recursive definition of A000040 */
    A206722(x,n) := block(
        local(p),
        p : prime ( n ),
        for k : 0 do (
           if p^(k+1) > x and p^k <= x then
              return(k)
           )
    )$
    for x : 2 thru 20 do (
        for n : 1 thru 17 do
          sprint(A206722(x,n)),
        newline()
    )$ /* R. J. Mathar, Feb 14 2012 */