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.

Previous Showing 41-46 of 46 results.

A123233 Difference between the (10^n)-th prime and the Riemann-Gram approximation of the (10^n)-th prime.

Original entry on oeis.org

1, 0, 5, -4, -39, -24, 1823, -6566, -1844, -34087, 84846, -449836, -1117632, -3465179, -1766196, -11290074, 105510354, -208774399, 704933861
Offset: 0

Views

Author

Cino Hilliard, Oct 06 2006

Keywords

Comments

The algorithm in the PARI script below produces the 10^n-th prime accurate to first n/2 places. Conjecture: The sign of the terms in this sequence changes infinitely often. Based on the small sample presented here, it appears the negative terms occur much more often.

Examples

			a(1) = prime(10) - primeGR(10) = 29 - 29 = 0.
		

Crossrefs

Programs

  • PARI
    primeGR(n) =
    \\ A good approximation for the n-th prime number using
    \\ the Gram-Riemann approximation of Pi(x)
    { local(x,px,r1,r2,r,p10,b,e); b=10; p10=log(n)/log(10); if(Rg(b^p10*log(b^(p10+1)))< b^p10,m=p10+1,m=p10); r1 = 0; r2 = 7.18281828; for(x=1,400, r=(r1+r2)/2; px = Rg(b^p10*log(b^(m+r))); if(px <= b^p10,r1=r,r2=r); r=(r1+r2)/2; ); floor(b^p10*log(b^(m+r))+.5); }
    Rg(x) =
    \\ Gram's Riemann's Approx of Pi(x)
    { local(n=1,L,s=1,r); L=r=log(x); while(s<10^40*r, s=s+r/zeta(n+1)/n; n=n+1; r=r*L/n); (s) }

Formula

prime(10^x)-primeRG(10^x), where prime(n) is the n-th prime and primeRG(n)is an approximation of the n-th prime number based on an exponential bisection routine that uses the Riemann-Gram approximation of Pi(x). The flow of the routine is evident in the PARI script below.
a(n) = A006988(n) - A121046(n) for n >= 1. - Amiram Eldar, Jul 04 2024

Extensions

a(17)-a(18) from Amiram Eldar, Jul 04 2024

A129870 Difference between the (10^n)-th and the (10^n-1)-th prime.

Original entry on oeis.org

6, 18, 12, 6, 20, 6, 2, 4, 12, 12, 20, 12, 22, 26, 30, 6, 72, 152, 72, 24, 30, 96, 124, 50
Offset: 1

Views

Author

Cino Hilliard, Jun 04 2007

Keywords

Comments

It is interesting that the number 2 occurs deep into the sequence indicating a twin prime pair. It is reasonable to ask if this will ever occur again. Similarly, the analogous sequence A074383, "Difference between (1+10^n)-th and (10^n)-th primes" has 2 occurring shallow into the sequence. It is reasonable to ask if the number 2 will ever occur again in that sequence. The link provides an excellent algorithm, primex(n), that I developed to find the n-th prime using Gram's approximation of Riemann's approximation R(x) for Pi(x). Primex(n) will give about n/2 exact digits for prime(n). For A006988 (18), primex(18) is 44211790234127235469.62904554...This is only as good as R (x) but nevertheless is superior to the exact formulas out there from a practical stand point. If we apply the code gpx(n) = for(x=1,n,y=nextprime(primex(10^x))-nextprime (primex(10^x-1));print1(floor(y)",")), we will get the erratic concoction 2,0,8,14,22,28,26,0,72,18,22,0,0,0,0,0,32,0,80,78,60,0 as an analytical counterpart of the sequence given.

Examples

			The (10^18)-th prime or A006988(18) = 44211790234832169331.
Using PARI, precprime(A006988(18)-1) = 44211790234832169179.
The difference is a(18) = 152.
		

Crossrefs

Formula

a(n) = A006988(n)-A151799(A006988(n))

Extensions

a(19) from Max Alekseyev, May 13 2009
a(20) from Max Alekseyev, May 30 2013
a(21),a(22) from Max Alekseyev, Dec 04 2014
a(23)-a(24) from Chai Wah Wu using terms in A006988, Sep 18 2018

A229661 Rounded percentage of primes less than 10^n.

Original entry on oeis.org

0, 40, 25, 17, 12, 10, 8, 7, 6, 5, 5, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 0

Views

Author

Jean-François Alcover, Sep 27 2013

Keywords

Comments

Please refer to the explanations and comments given in A006879 and A006880.

Examples

			There are 4 primes less than 10 (i.e., 2, 3, 5, 7), so a(1) = 40.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := PrimePi[10^n]/10^(n-2) // Round;
    (* or *) a[n_] := A006880[[n+1]]/10^(n-2) // Round; Table[Print["10^", n, " ", a[n], "%"]; a[n], {n, 0, 25}] (* Jean-François Alcover, Sep 27 2013 *)

Formula

a(n) = pi(10^n)/10^(n-2) rounded.

A235642 a(n) = prime(10^n) mod 10^n.

Original entry on oeis.org

0, 9, 41, 919, 4729, 99709, 485863, 9424673, 38074743, 801763489, 2097800623, 60727302517, 996224275833, 3780508946331, 75385758524527, 124508045065437, 4906913903735329, 85296581467695669, 211790234832169331, 5675465116607065549
Offset: 0

Views

Author

Zak Seidov, Apr 20 2014

Keywords

Comments

Last (n+1) digits of A006988(n).

Crossrefs

Programs

Formula

a(n) = A004648(10^n) = A006988(n) mod 10^n.

A297424 a(n) = tau((10^n)-th prime) where tau(n)=A000594(n) is Ramanujan's tau function.

Original entry on oeis.org

-24, 128406630, -1695266465052058, -4467161474022023509680, 2643202687128887204371152330, 5631587063815097155948902224731910, -6022712388820421179671063354886818730888, 3519878895631571325515625172934456394359869922, 452493700789420934344344052367209646628330983653992
Offset: 0

Views

Author

Seiichi Manyama, Dec 30 2017

Keywords

Crossrefs

Programs

  • PARI
    {a(n) = ramanujantau(prime(10^n))}

Formula

a(n) = A076847(10^n) = A000594(A006988(n)).

A301599 Numbers k at which the ratio r(k) = (k-th prime) / (average of first k primes) reaches a record high.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 9, 10, 12, 17, 25, 31, 35, 48
Offset: 1

Views

Author

Jon E. Schoenfield, Mar 24 2018

Keywords

Comments

Equivalently, define the function f(k) = k*prime(k)/Sum_{j=1..k} prime(j); sequence lists numbers k such that f(k) > f(m) for all m < k.
a(14)=48 is the final term. Beyond k=48, r(k) decreases fairly smoothly (although nonmonotonically); see the Example section.
For m = 4..18, the first k > 48 at which r(k) < 2 - 1/m is 50, 53, 61, 775, 2678, 8973, 23483, 63535, 159863, 431988, 1091840, 2753459, 7186422, 18479367, 47260890, respectively. Does lim_{k->inf} r(k) equal 2? - Jon E. Schoenfield, Mar 27 2018

Examples

			The table below shows k, prime(k), the sum and average of the first k primes, and r(k), for each number k in the sequence, and also for k = 100, 1000, ..., 10^7.
.
   n|   a(n)=k  prime(k)             sum         avg    r(k)
  --+--------------------------------------------------------
   1|        1         2               2        2.000 1.00000
   2|        2         3               5        2.500 1.20000
   3|        3         5              10        3.333 1.50000
   4|        4         7              17        4.250 1.64706
   5|        5        11              28        5.600 1.96429
   6|        7        17              58        8.286 2.05172
   7|        9        23             100       11.111 2.07000
   8|       10        29             129       12.900 2.24806
   9|       12        37             197       16.417 2.25381
  10|       17        59             440       25.882 2.27955
  11|       25        97            1060       42.400 2.28774
  12|       31       127            1720       55.484 2.28895
  13|       35       149            2276       65.029 2.29130
  14|       48       223            4661       97.104 2.29650
           100       541           24133      241.330 2.24174
          1000      7919         3682913     3682.913 2.15020
         10000    104729       496165411    49616.541 2.11077
        100000   1299709     62260698721   622606.987 2.08753
       1000000  15485863   7472966967499  7472966.967 2.07225
      10000000 179424673 870530414842019 87053041.484 2.06110
		

Crossrefs

Cf. A000040 (primes), A007504 (sum of first n primes), A006988 ((10^n)-th prime), A099824 (sum of first 10^n primes).
Previous Showing 41-46 of 46 results.