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-4 of 4 results.

A098389 Prime(n) - floor(log_2(prime(n))).

Original entry on oeis.org

1, 2, 3, 5, 8, 10, 13, 15, 19, 25, 27, 32, 36, 38, 42, 48, 54, 56, 61, 65, 67, 73, 77, 83, 91, 95, 97, 101, 103, 107, 121, 124, 130, 132, 142, 144, 150, 156, 160, 166, 172, 174, 184, 186, 190, 192, 204, 216, 220, 222, 226, 232, 234, 244, 249, 255, 261, 263, 269, 273
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 06 2004

Keywords

Comments

a(n) = A000040(n) - A098388(n).

Examples

			a(10) = A000040(10) - A098388(10) = 29 - 4 = 25.
		

Crossrefs

Programs

A098387 Prime(n)+Log2(n), where Log2=A000523.

Original entry on oeis.org

2, 4, 6, 9, 13, 15, 19, 22, 26, 32, 34, 40, 44, 46, 50, 57, 63, 65, 71, 75, 77, 83, 87, 93, 101, 105, 107, 111, 113, 117, 131, 136, 142, 144, 154, 156, 162, 168, 172, 178, 184, 186, 196, 198, 202, 204, 216, 228, 232, 234, 238, 244, 246, 256, 262, 268, 274, 276
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 06 2004

Keywords

Examples

			a(10) = A000040(10) + A000523(10) = 29 + 3 = 32.
		

Crossrefs

A098392 Prime(n)-Log2(Log2(prime(n))), where Log2=A000523.

Original entry on oeis.org

2, 3, 4, 6, 10, 12, 15, 17, 21, 27, 29, 35, 39, 41, 45, 51, 57, 59, 65, 69, 71, 77, 81, 87, 95, 99, 101, 105, 107, 111, 125, 129, 135, 137, 147, 149, 155, 161, 165, 171, 177, 179, 189, 191, 195, 197, 209, 221, 225, 227, 231, 237, 239, 249, 254, 260, 266, 268, 274, 278
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 06 2004

Keywords

Comments

a(n) = A000040(n) - A098391(n).

Examples

			a(10) = A000040(10) - A098391(10) = 29 - 2 = 27.
		

Crossrefs

A098396 Number of primes that are not less than prime(n)-Log2(n) and not greater than prime(n)+Log2(n), where Log2=A000523.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Sep 06 2004

Keywords

Examples

			a(10) = #{p prime: A098386(10) <= p <= A098387(10)} =
= #{p prime: 26 <= p <= 32} = #{29,31} = 2.
		

Programs

  • Maple
    f:= proc(n) local p,d;
      p:= ithprime(n); d:= ilog2(n);
      numtheory:-pi(p+d)-numtheory:-pi(p-d-1)
    end proc:
    map(f, [$1..200]); # Robert Israel, Aug 13 2018
  • Mathematica
    a[n_] := With[{p = Prime[n], d = BitLength[n]-1}, PrimePi[p+d] - PrimePi[p-d-1]];
    Table[a[n], {n, 1, 200}] (* Jean-François Alcover, Feb 07 2023 *)

Formula

a(n) = A000720(A098386(n)) - A000720(A098387(n)-1).
A098398(n) <= a(n) <= A098397(n) <= A097935(n).
Showing 1-4 of 4 results.