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

A241540 Indices of primes p in A182514, i.e., a(n) = primepi(p) = A000720(A182514(n)).

Original entry on oeis.org

1, 2, 4, 30, 217, 49749629143526
Offset: 1

Views

Author

M. F. Hasler, Apr 25 2014

Keywords

Comments

a(6) = A214935(33) = A000720(A205827(33)).

Crossrefs

A002386 Primes (lower end) with record gaps to the next consecutive prime: primes p(k) where p(k+1) - p(k) exceeds p(j+1) - p(j) for all j < k.

Original entry on oeis.org

2, 3, 7, 23, 89, 113, 523, 887, 1129, 1327, 9551, 15683, 19609, 31397, 155921, 360653, 370261, 492113, 1349533, 1357201, 2010733, 4652353, 17051707, 20831323, 47326693, 122164747, 189695659, 191912783, 387096133, 436273009, 1294268491
Offset: 1

Views

Author

Keywords

Comments

See the links by Jens Kruse Andersen et al. for very large gaps.

References

  • B. C. Berndt, Ramanujan's Notebooks Part IV, Springer-Verlag, see p. 133.
  • D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 3, Sect 6.1, Table 1.
  • M. Kraitchik, Recherches sur la Théorie des Nombres. Gauthiers-Villars, Paris, Vol. 1, 1924, Vol. 2, 1929, see Vol. 1, p. 14.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000040, A001223, A000101 (upper ends), A005250 (record gaps), A000230, A111870, A111943.
See also A205827(n) = A000040(A214935(n)), A182514(n) = A000040(A241540(n)).

Programs

  • Mathematica
    s = {2}; gm = 1; Do[p = Prime[n]; g = Prime[n + 1] - p; If[g > gm, Print[p]; AppendTo[s, p]; gm = g], {n, 2, 1000000}]; s   (* Jean-François Alcover, Mar 31 2011 *)
    Module[{nn=10^7,pr,df},pr=Prime[Range[nn]];df=Differences[pr];DeleteDuplicates[ Thread[ {Most[ pr],df}],GreaterEqual[#1[[2]],#2[[2]]]&]][[All,1]] (* The program generates the first 26 terms of the sequence. *) (* Harvey P. Dale, Sep 24 2022 *)
  • PARI
    a(n)=local(p,g);if(n<2,2*(n>0),p=a(n-1);g=nextprime(p+1)-p;while(p=nextprime(p+1),if(nextprime(p+1)-p>g,break));p) /* Michael Somos, Feb 07 2004 */
    
  • PARI
    p=q=2;g=0;until( g<(q=nextprime(1+p=q))-p && print1(q-g=q-p,","),) \\ M. F. Hasler, Dec 13 2007

Formula

a(n) = A000101(n) - A005250(n) = A008950(n-1) - 1. - M. F. Hasler, Dec 13 2007
A000720(a(n)) = A005669(n).
a(n) = A000040(A005669(n)). - M. F. Hasler, Apr 26 2014

Extensions

Definition clarified by Harvey P. Dale, Sep 24 2022

A134266 Primes associated with the prime gaps listed in A085237.

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 23, 31, 47, 53, 61, 73, 83, 89, 113, 293, 317, 523, 887, 1129, 1327, 8467, 9551, 12853, 14107, 15683, 19609, 25471, 31397, 155921, 338033, 360653, 370261, 492113, 1349533, 1357201, 1561919, 2010733, 4652353, 11113933, 15203977, 17051707, 20831323, 47326693, 122164747, 189695659, 191912783
Offset: 1

Views

Author

David W. Wilson, Dec 31 2007

Keywords

Comments

The smallest prime p(n) such that p(n+1)-p(n) is nondecreasing. The smallest prime p(n) such that (p(n+1)/p(n))^p(n) is increasing. [Thomas Ordowski, May 26 2012]
a(n) is the last prime in the n-th sublist of prime numbers defined in A348178. - Ya-Ping Lu, Oct 19 2021

Crossrefs

See also A205827(n) = A000040(A214935(n)), A182514(n) = A000040(A241540(n)).
Cf. A348178.

Programs

  • Python
    from sympy import nextprime; p, r = 2, 0
    while p < 2*10**8:
        q = nextprime(p); g = q - p
        if g >= r: print(p, end = ', '); r = g
        p = q # Ya-Ping Lu, Jan 23 2024

Formula

a(n) = A000040(A085500(n)). - M. F. Hasler, Apr 26 2014

A085500 Indices of primes where nondecreasing gaps occur.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 11, 15, 16, 18, 21, 23, 24, 30, 62, 66, 99, 154, 189, 217, 1059, 1183, 1532, 1663, 1831, 2225, 2810, 3385, 14357, 29040, 30802, 31545, 40933, 103520, 104071, 118505, 149689, 325852, 733588, 983015, 1094421, 1319945, 2850174, 6957876, 10539432, 10655462
Offset: 1

Views

Author

Farideh Firoozbakht, Aug 15 2003

Keywords

Comments

A005669 is a subsequence of this sequence.

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section A8, pp. 31-39.

Crossrefs

Programs

  • Mathematica
    f[n_] := Prime[n+1]-Prime[n]; v1={}; v2={}; Do[If[f[n]>=If[n==1, 1, Last[v2]], v=n; v1=Append[v1, n]; v2=Append[v2, f[v]]; Print[v1]], {n, 105000000}]

Formula

a(n) = A000720(A134266(n)). - M. F. Hasler, Apr 26 2014

Extensions

a(45)-a(47) from Amiram Eldar, Sep 05 2024

A262061 Least prime(i) such that prime(i)^(1+1/i) - prime(i) > n.

Original entry on oeis.org

2, 3, 5, 7, 11, 11, 17, 17, 23, 29, 29, 37, 41, 53, 59, 67, 79, 89, 97, 127, 127, 137, 163, 179, 211, 223, 251, 293, 307, 337, 373, 419, 479, 521, 541, 587, 691, 727, 797, 853, 929, 1009, 1151, 1201, 1277, 1399, 1523, 1693, 1777, 1931, 2053, 2203, 2333, 2521, 2647, 2953, 3119, 3299, 3527, 3847, 4127
Offset: 1

Views

Author

Keywords

Comments

Where A246778(i) first exceeds n, stated by p_i.
Similar to A245396.
Number of terms < 10^n: 4, 19, 41, 75, 120, 176, 242, 319, 407, 506, ..., .
Concerning Firoozbakht's Conjecture (1982): (prime(n+1))^(1/(n+1)) < prime(n)^(1/n), for all n = 1 or prime(n+1) < prime(n)^(1+1/n), which can be rewritten as: (log(prime(n+1))/log(prime(n)))^n < (1+1/n)^n. This suggests a weaker conjecture: (log(prime(n+1))/log(prime(n)))^n < e.
Prime index of a(n): 1, 1, 3, 4, 5, 5, 7, 7, 9, 10, 10, 12, 13, 16, 17, 19, 22, 24, 25, 31, 31, ..., .
All terms are unique for n > 21. Indices not unique: 1 & 2, 5 & 6, 7 & 8, 10 & 11 and 20 & 21.
The distribution of initial digits, 1...9, for a(n), n<508: 140, 91, 60, 50, 44, 36, 32, 27 and 26.

Examples

			a(20) = 127 since for all primes less than the 31st prime, 127, p_k^(32/31) - p_k are less than 20.
a(100) = 38113,
a(200) = 2400407,
a(300) = 57189007,
a(400) = 828882731,
a(500) = 8748565643,
a(1000) = 91215796479037,
a(1064) = 246842748060263, limit of Mathematica by direct computation, i.e., the first Mathematica line.
		

References

  • Paulo Ribenboim, The little book Of bigger primes, second edition, Springer, 2004, p. 185.

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{p = 2, k = 1}, While[n > p^(1 + 1/k) - p, p = NextPrime@ p; k++]; p]; Array[f, 60] (* or  quicker *)
    (* or quicker *) p = 2; i = 1; lst = {}; Do[ While[ p^(1 + 1/i) < n + p, p = NextPrime@ p; i++]; AppendTo[lst, p]; Print[{n, p}], {n, 100}]; lst
  • PARI
    a(n) = {i = 0; forprime(p=2,, i++; if (p^(1+1/i) - p > n, return (p)););} \\ Michel Marcus, Oct 04 2015

Formula

Log(y) ~= g + x^(1/2) where g = Euler's Gamma.

Extensions

a(2) corrected in b-file by Andrew Howroyd, Feb 22 2018

A263023 Largest integer k such that prime(n+1) < prime(n)^(1+1/k).

Original entry on oeis.org

1, 2, 4, 4, 14, 9, 25, 15, 13, 50, 19, 35, 77, 42, 32, 37, 122, 43, 72, 153, 54, 88, 63, 52, 113, 235, 121, 252, 130, 40, 156, 108, 339, 71, 375, 128, 134, 210, 144, 151, 466, 96, 504, 256, 523, 90, 96, 304, 618, 313, 214, 657, 134, 233, 240, 247, 755, 255
Offset: 1

Views

Author

Alexei Kourbatov, Oct 08 2015

Keywords

Comments

Firoozbakht's conjecture: prime(n+1) < prime(n)^(1+1/n).
Firoozbakht's conjecture restated for this sequence: a(n) >= n.
I further conjecture that n = 1,2,4 are the only values of n with a(n) = n.
Record values of a(n) occur when prime(n) and prime(n+1) are twin primes.
Upper bound for all n: a(n) < (1/2)*(prime(n)+2)*log(prime(n)).

Examples

			prime(1)=2; a(1)=1 because k=1 is the largest k for which 3 < 2^(1+1/k).
prime(2)=3; a(2)=2 because k=2 is the largest k for which 5 < 3^(1+1/k).
prime(10)=29; a(10)=50 because k=50 is the largest k for which 31 < 29^(1+1/k).
		

References

  • Paulo Ribenboim, The little book of bigger primes, 2nd edition, Springer, 2004, p. 185.

Crossrefs

Programs

  • Magma
    [Floor(Log(NthPrime(n))/(Log(NthPrime(n+1))-Log(NthPrime(n)))): n in [1..60]]; // Vincenzo Librandi, Oct 08 2015
    
  • Mathematica
    Table[Floor[Log@ Prime@ n /(Log@ Prime[n + 1] - Log@ Prime@ n)], {n, 58}] (* Michael De Vlieger, Oct 08 2015 *)
  • PARI
    a(n) = floor(log(prime(n))/(log(prime(n+1)) - log(prime(n)))) \\ Michel Marcus, Oct 10 2015

Formula

a(n) = floor(log(prime(n))/(log(prime(n+1)) - log(prime(n)))).

Extensions

More terms from Vincenzo Librandi, Oct 08 2015
Showing 1-6 of 6 results.