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.

User: John W. Nicholson

John W. Nicholson's wiki page.

John W. Nicholson has authored 53 sequences. Here are the ten most recent ones:

A350582 Decimal expansion of sum of reciprocals of maximal prime gap primes: Sum_{n>=1} 1/A000101(n).

Original entry on oeis.org

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

Author

John W. Nicholson, Jan 07 2022

Keywords

Examples

			0.68172979491338871...
		

Crossrefs

Programs

  • PARI
    v = readvec("b000101.txt");s=0; for(i=1,#v,s= 1/v[i]+s);s*1.
    \\ PARI's "readvec" doesn't work with the 2-column original OEIS b-file "b000101.txt". One needs to strip the index column first from b-file.

Extensions

a(15)-a(17) from John W. Nicholson, Feb 25 2025

A350581 Decimal expansion of sum of reciprocals of maximal prime gap primes: Sum_{n>=1} 1/A002386(n).

Original entry on oeis.org

1, 0, 4, 4, 7, 0, 0, 5, 8, 5, 0, 8, 1, 1, 9
Offset: 1

Author

John W. Nicholson, Jan 07 2022

Keywords

Examples

			1.04470058508119...
		

Crossrefs

Programs

  • PARI
    B2386A = readvec("b002386.txt");s=0;for(i=1,80,s= 1/B2386A[i]+s);s*1.
    \\ PARI's "readvec" doesn't work with the 2-column original OEIS b-file "b002386.txt". One needs to strip the index column first from b-file.

A326915 Number of terms of A002386 (primes preceding record prime gaps) in the interval (2^n, 2^(n+1)].

Original entry on oeis.org

1, 1, 1, 0, 1, 0, 2, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 1, 3, 0, 3, 0, 1, 0, 2, 1, 1, 2, 2, 0, 2, 2, 1, 1, 3, 1, 1, 2, 5, 2, 3, 1, 1, 1, 1, 1, 1, 2, 0, 0, 3, 0, 0, 0, 0, 2, 1, 2, 4, 1, 1, 0, 2, 3
Offset: 0

Author

John W. Nicholson, Oct 20 2019

Keywords

Comments

The record prime gaps are in A005250; the corresponding primes are in A002386.

Examples

			For n=3, there are no primes p_m in A002386 in the range 2^3 = 8 < p_m <= 16 = 2^4, so a(3)=0.
For n=6, there are 2 primes p_m in A002386 in the range 2^6 = 64 < p_m <= 128 = 2^7, namely p_m = 89, 113, so a(6)=2.
		

Crossrefs

Cf. A000101 (upper ends), A005250 (record gaps).

A280380 First occurrence of A280379(k) = n.

Original entry on oeis.org

1, 2, 30, 46, 374, 2146, 5945, 14855, 24702
Offset: 0

Author

John W. Nicholson, Jan 09 2017

Keywords

Comments

n < log(a(n)) for a(n) < 1.1*10^6.

Examples

			For prime(30)=113, A056171(113) = 14, A104272(12)=107 and A104272(13) = 127, so 14 - 12 = 2 (First occurrence).
		

Crossrefs

Programs

  • PARI
    \\RR[x] is a list of Ramanujan primes, A104272.
    {plimit=1.1*10^6;i=n=s=0;
    forprime(p=2,plimit,
    s++;
    if(p==RR[n+1],n++);
    if(i==s-primepi(floor(p/2))-n,print(i," ",s);i++)
    )
    }

A280379 a(n) = A056171(k) - m, where k=prime(n) and m is the Ramanujan prime index to the greatest Ramanujan prime R(m) <= k.

Original entry on oeis.org

0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 2, 0, 1, 1, 2, 0, 0, 1, 1, 0, 1, 0, 0, 1, 2, 2, 3, 2, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 2, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0
Offset: 1

Author

John W. Nicholson, Jan 01 2017

Keywords

Comments

a(n)=0 corresponds to the Ramanujan prime R_m = A104272(m) = A056171(k).

Examples

			For prime(30)=113, A056171(113) = 14, 107 is R_12 and 127 is R_13, so 14 -12 = 2 (first occurrence).
		

Crossrefs

Programs

  • PARI
    \\RR[x] is a list of Ramanujan primes, A104272.
    {plimit=1.1*10^4;n=s=0;
    forprime(p=2,plimit,
        s++;
        if(p==RR[n+1],n++);
        print1(s-primepi(floor(p/2))-n,", ");
        )
    }

Formula

a(n) = A056171(k) - m, where k=prime(n) and m is the Ramanujan prime index to the greatest Ramanujan prime R_m = A104272(m) <= k.

A277719 Index for the bound for the first k-Ramanujan prime.

Original entry on oeis.org

3, 5, 7, 10, 12, 16, 31, 35, 47, 48, 63, 67, 100, 218, 264, 298, 328, 368, 430, 463, 591, 651, 739, 758, 782, 843, 891, 929, 1060, 1184, 1230, 1316, 1410, 1832, 2226, 3386, 3645, 3794, 3796, 4523, 4613, 4755, 5009, 5950
Offset: 1

Author

John W. Nicholson, Oct 27 2016

Keywords

Comments

The index a(n) is h(n), the prime A277718(n) is p_h(n). If 1 <= n <= 43 and k in [p_{h(n+1)}/p_{h(n+1)-1}, p_{h(n)}/p_{h(n)-1}), then the first k-Ramanujan prime R^{(k)}1 = p{h(n)}. Extra terms require improvements of prime numbers in short intervals.

Examples

			With n = 3, we see p_h(3) = 17, p_h(4) = 29, so that 29/23 <= k < 17/13. If k = 1.3 then R^(1.3)_1 = 17 = p_h(3).
		

Crossrefs

Cf. A277718, A164952, A104272, A290394 (first (1 + 1/n)-Ramanujan prime).

A277718 Bounding prime for the first k-Ramanujan prime.

Original entry on oeis.org

5, 11, 17, 29, 37, 53, 127, 149, 211, 223, 307, 331, 541, 1361, 1693, 1973, 2203, 2503, 2999, 3299, 4327, 4861, 5623, 5779, 5981, 6521, 6947, 7283, 8501, 9587, 10007, 10831, 11777, 15727, 19661, 31469, 34123, 35671, 35729, 43391, 44351, 45943, 48731, 58889
Offset: 1

Author

John W. Nicholson, Oct 27 2016

Keywords

Comments

The index A277719(n) is h(n), the prime a(n) is p_h(n). If 1 <= n <= 43 and k in [p_{h(n+1)}/p_{h(n+1)-1}, p_{h(n)}/p_{h(n)-1}), then the first k-Ramanujan prime R^{(k)}1 = p{h(n)}. Extra terms require improvements of prime numbers in short intervals.

Examples

			With n = 3, we see p_h(3) = 17, p_h(4) = 29, so that 29/23 <= k < 17/13. If k = 1.3 then R^(1.3)_1 = 17 = p_h(3).
		

Crossrefs

Cf. A277719, A164952, A104272, A290394 (first (1 + 1/n)-Ramanujan prime).

A267549 Primes prime(k) such that floor( (prime(k)/k)^2 ) <= prime(k+1) - prime(k).

Original entry on oeis.org

3, 5, 7, 13, 23, 113
Offset: 1

Author

John W. Nicholson, Jan 16 2016

Keywords

Comments

Prime index A000720 is: 2, 3, 4, 6, 9, and 30.
floor( (prime(k)/k)^2 ) is: 2, 2, 3, 4, 6, and 14.
Similarly, ceiling( (prime(k)/k)^2 ) > prime(k+1) - prime(k) holds for all prime(k) < 10^8 with the exception of prime(k) = 7. For prime(k) = 7, 4 = ceiling((prime(k) / k)^2) = prime(k+1) - prime(k).
Stronger than Firoozbakht's conjecture which states that the sequence prime(k)^(1/k) is strictly decreasing.
Conjecture: list is complete. If so, subsequence of A124147 and A174635.
Andrew Granville conjectures that lim sup (prime(n+1)-prime(n))/log(prime(n))^2 >= 2/e^gamma = 1.1229189.... If so (or at least if the lim sup is greater than 1) then this sequence is infinite. - Charles R Greathouse IV, Feb 18 2016

Examples

			For a(3) = 7, floor((7 / 4)^2) = 3 < 4 = 11 - 7. Note that all other a(n) use = instead of <.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime@ Range[10^5], Floor[(#/PrimePi@ #)^2] <= NextPrime@ # - # &] (* Michael De Vlieger, Jan 21 2016 *)
  • PARI
    L=10^11;p=2;forprime(q=3,L,a=floor((p/primepi(p))^2.);if(a<=q-p, print1(p, ", "));p=q)

Formula

Floor((A000040(k) / k)^2) <= A000040(k+1)-A000040(k), where k = A000720.
Floor(A001248(k) / A000290(k)) <= A001223(k), where k = A000720.

A238734 Log of twice the twin prime constant, C_2, log(2*A005597).

Original entry on oeis.org

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

Author

John W. Nicholson, Mar 03 2014

Keywords

Comments

The value occurs as term in equation (15) in the Wolf paper. - Ralf Stephan, Mar 28 2014

Examples

			0.2778768820732319619323108667032534203602062941473682988245270533677164980...
		

Crossrefs

Programs

  • Mathematica
    digits = 113;
    s[n_] := (1/n)*N[Sum[MoebiusMu[d]*2^(n/d), {d, Divisors[n]}], digits + 50];
    C2 = (175/256)*Product[(Zeta[n]*(1 - 2^(-n))*(1 - 3^(-n))*(1 - 5^(-n))*(1 - 7^(-n)))^(-s[n]), {n, 2, digits + 50}];
    RealDigits[Log[2 C2]][[1]][[1 ;; digits]] (* Jean-François Alcover, Feb 16 2019 *)
  • PARI
    default(realprecision,1000);
    result={175/256*prod(k=2, 500, (zeta(k)*(1-1/2^k)*(1-1/3^k)*(1-1/5^k)*(1-1/7^k))^(-sumdiv(k, d, moebius(d)*2^(k/d))/k))};log(2*result)
    
  • PARI
    log(2 * prodeulerrat(1-1/(p-1)^2, 1, 3)) \\ Amiram Eldar, Mar 16 2021

Formula

Equals log(2*A005597).

A234298 Ramanujan prime R_k such that pi(R_(k+1)) - pi(R_k) are record values: record Ramanujan prime A190874(k).

Original entry on oeis.org

2, 71, 181, 503, 2531, 5273, 9887, 11587, 55339, 174917, 225961, 534883, 2492311, 5409337, 130449773, 141833603, 212583797, 658046911, 1183597123, 2897211971, 5602581277, 46992178547, 70637059291, 158465541049, 182591976709, 339683208863
Offset: 1

Author

John W. Nicholson, Dec 22 2013

Keywords

Comments

These are the primes preceding the unique values of A174641. That sequence is the start of a run of non-Ramanujan primes, so the previous prime is the Ramanujan prime. - Dana Jacobsen, Jul 14 2016

Crossrefs

Record values are in A202186, index of A190874 at record terms in A202187, A202188 is the index of A168425 when A174641(n) = A168425(m); A202188(n) = m. A202187 is also the index of a(n).

Programs

  • Perl
    perl -Mntheory=:all -nE 'my $n = $1 if /(\d+)$/; say ++$x," ",prev_prime($n) unless $seen{$n}++;' b174641.txt  # Dana Jacobsen, Jul 14 2016
    
  • Perl
    use ntheory ":all"; my($max,$r)=(0,ramanujan_primes(1e7)); for (0..$#$r-1) { my $d=prime_count($r->[$+1])-prime_count($r->[$]); if ($d > $max) { say $r->[$]; $max=$d; } } # _Dana Jacobsen, Jul 14 2016

Extensions

a(20) to a(26) from Dana Jacobsen, Jul 14 2016