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 11-20 of 67 results. Next

A058320 Distinct even prime-gap lengths (number of composites between primes), from 3+2, 7+4, 23+6,...

Original entry on oeis.org

2, 4, 6, 8, 14, 10, 12, 18, 20, 22, 34, 24, 16, 26, 28, 30, 32, 36, 44, 42, 40, 52, 48, 38, 72, 50, 62, 54, 60, 58, 46, 56, 64, 68, 86, 66, 70, 78, 76, 82, 96, 112, 100, 74, 90, 84, 114, 80, 88, 98, 92, 106, 94, 118, 132, 104, 102, 110, 126, 120, 148, 108
Offset: 0

Views

Author

Warren D. Smith, Dec 11 2000

Keywords

Comments

Nicely and Nyman have sieved up to 1.3565*10^16 at least. They admit it is likely they have suffered from hardware or software bugs, but believe the probability the sequence up to this point is incorrect is <1 in a million. This sequence is presumably all even integers (in different order). It is not monotonic. The monotonic subsequence of record-breaking prime gaps is A005250.
Essentially the same as A014320. [From R. J. Mathar, Oct 13 2008]

Crossrefs

Equals 2*A014321(n-1).

Programs

  • Mathematica
    DeleteDuplicates[Differences[Prime[Range[2,200000]]]] (* Harvey P. Dale, Dec 07 2014 *)

Extensions

Comment corrected by Harvey P. Dale, Dec 07 2014

A065385 Numbers m at which value of cototient function (A051953) reaches a new record: cototient(m) > cototient(k) for all k < m.

Original entry on oeis.org

1, 2, 4, 6, 10, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 102, 108, 114, 120, 126, 132, 138, 144, 150, 168, 180, 198, 204, 210, 240, 252, 264, 270, 294, 300, 330, 360, 378, 390, 420, 450, 462, 480, 504, 510, 540, 546, 570, 600, 630, 660, 690, 714
Offset: 1

Views

Author

Labos Elemer, Nov 05 2001

Keywords

Comments

For totient values prime numbers give similar records.

Examples

			a(8) = 30 because for m = 1...29 the cototient values are all smaller than cototient(30) = 22 = A065386(8) and this is the 8th number at which such a record is reached; analogous sequences are A002093, A002182, A015702 or A005250 for functions other than cototient.
		

Crossrefs

Programs

  • Mathematica
    With[{s = Array[# - EulerPhi@ # &, 10^3]}, Map[FirstPosition[s, #][[1]] &, Union@ FoldList[Max, s]]] (* Michael De Vlieger, May 16 2018 *)
  • PARI
    r=-1; for(n=1,1000,d=n-eulerphi(n); if(r
    				
  • PARI
    { n=0; x=-1; for (m=1, 10^9, c=m - eulerphi(m); if (c > x, x=c; write("b065385.txt", n++, " ", m); if (n==1000, return)) ) } \\ Harry J. Smith, Oct 17 2009

Formula

a=0; s=0; Do[s=n-EulerPhi[n]; If[s>a, a=s; Print[n]], {n, 1, 10000}]

A038460 Maximal value of difference between successive primes among numbers < 10^n.

Original entry on oeis.org

2, 8, 20, 36, 72, 114, 154, 220, 282, 354, 464, 540, 674, 804, 906, 1132, 1220, 1442, 1510
Offset: 1

Views

Author

Enoch Haga, Dec 11 1999

Keywords

Comments

All terms are even, and the sequence is strictly increasing, and therefore also yields the maximal gap between n-digit primes (unless a gap containing 10^k would be larger than all gaps up to 10^(k+1), which does not happen). Therefore also a subsequence of A005250, which is a subsequence of A001223. - M. F. Hasler, Dec 29 2014
For 3 < n < 19, a(n) <= 6 (n - 1)(n - 2). Conjecture: for any n > 3, a(n) <= 6 (n - 1)(n - 2). Let q = 6 (n - 1)(n - 2) and d = (10^n) - (10^(n/2) - 1)^2. Since for any even n, d is the smallest difference between two consecutive squares of the form a^2 - b^2, where a^2 = 10^n, b = a - 1, for any even n > 2, d > 5q (where 3q is, according to the conjecture, not less than the sum of the three largest gaps between 4 consecutive primes p1...p4, or 3 * a(n), and 2q is, respectively, not less than the sum of the two largest gaps (p1 - p0) + (p5 - p4), or 2 * a(n)). In the same way, we can state that for any odd n > 3, if a^2 is the smallest square such that a^2 has (n+1) digits, b = a - 1, and d = a^2 - b^2, then d > 5q. The correctness of the above conjecture would establish the well-known Brocard's and Legendre's conjectures (see the link below for both definitions), since they are proved for the first 10000 primes. - Sergey Pavlov, Jan 30 2017

Examples

			Of the 25 primes less than 100, the maximum difference between two consecutive primes is 8 (at 97 - 89), so a(2)=8.
		

References

  • Enoch Haga, Exploring Prime Numbers on Your PC, 2nd edition, 1998, ISBN 1-885794-16-9, Table 3.

Crossrefs

Cf. A038343. See A053303 for another version.

Programs

  • Mathematica
    a[1] = 2; a[n_] := a[n] = Module[{m, p, q}, m = a[n-1]; p = NextPrime[10^(n - 1), -1]; For[q = NextPrime[p], q < 10^n, q = NextPrime[q], m = Max[m, q - p]; p = q]; m]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 10}] (* Jean-François Alcover, May 16 2017 *)
    Table[Differences[Prime[Range[PrimePi[10^n]]]]//Max,{n,10}] (* The program generates the first 10 terms of the sequence. *) (* Harvey P. Dale, Sep 11 2024 *)
  • PARI
    a(n) = {dmax = 0; minp = 2; forprime(p=3, 10^n, if ((d = (p - minp)) > dmax, dmax = d); minp = p;); dmax;} \\ Michel Marcus, May 25 2014
    
  • PARI
    m=0;L=1;o=2;forprime(p=3,10^9,m+o>=(o=p)&&next;#Str(p)>L&&!print1(m" /*"L"*/, ")&&L=#Str(p);m=p-precprime(p-1)) \\ Too slow for n>9. M. F. Hasler, Dec 29 2014

Extensions

Two more terms (282, 354) from Jud McCranie
Terms 464 through 1442 from Manfred W. K. Huppertz (huppi-manni(AT)hesit.de), Aug 18 2009
a(19) from Hugo Pfoertner, using data from pzktupel webpage. Jan 21 2025

A053695 Differences between record prime gaps.

Original entry on oeis.org

1, 2, 2, 2, 6, 4, 2, 2, 12, 2, 8, 8, 20, 14, 10, 16, 2, 4, 14, 16, 6, 26, 30, 10, 2, 12, 14, 2, 32, 6, 4, 28, 16, 18, 28, 2, 10, 62, 8, 4, 6, 12, 4, 10, 14, 2, 16, 2, 6, 42, 6, 14, 50, 22, 42, 50, 12, 26, 2, 100, 10, 8, 208, 52, 14, 22, 4, 24, 24, 56, 28, 14, 72, 34, 12, 22
Offset: 1

Views

Author

Jeff Burch, Mar 23 2000

Keywords

Comments

The largest known term of this sequence is a(63) = 1132 - 924 = 208. This seems rather strange for a(63) > 2*100+7 where 100 = max {a(k)| k < 63}. {1,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,42,50,52,56,62,72,100,208} is the set of the distinct first 75 terms of the sequence. What is the smallest number m such that a(m) = 36? - Farideh Firoozbakht, May 30 2014
Conjecture: a(n) <= A005250(n). Based on the equivalent statement at A005250: A005250(n+1) / A005250(n) <= 2. - John W. Nicholson, Dec 30 2015

Crossrefs

Programs

  • Mathematica
    m = 2; r = 0; Differences@ Reap[Monitor[Do[If[Set[d, Set[n, NextPrime[m]] - m] > r, Set[r, d]; Sow[d]]; m = n, {i, 10^7}], i]][[-1, -1]] (* Michael De Vlieger, Oct 30 2021 *)

Formula

a(n) = A005250(n+1) - A005250(n).
A005250(n+1) = 1 + Sum_{i=1..n} a(i). - John W. Nicholson, Dec 29 2015

Extensions

Missing term 1 and more terms added by Farideh Firoozbakht, May 30 2014
a(75)-a(76) from John W. Nicholson, Feb 27 2018

A215231 Increasing gaps between semiprimes.

Original entry on oeis.org

2, 3, 4, 6, 7, 11, 14, 19, 20, 24, 25, 28, 30, 32, 38, 47, 54, 55, 70, 74, 76, 82, 85, 87, 88, 95, 98, 107, 110, 112, 120, 123, 126, 146, 163, 166, 171, 174
Offset: 1

Views

Author

T. D. Noe, Aug 07 2012

Keywords

Comments

See A215232 and A217851 for the semiprimes that begin and end the gaps.
Records in A065516. - R. J. Mathar, Aug 09 2012
How long can these gaps be? In the Cramér model, with x = A215232(n), they are of length log(x)^2/log(log(x))(1 + o(1)) with probability 1. - Charles R Greathouse IV, Sep 07 2012
a(n) = A065516(A085809(n)). - Reinhard Zumkeller, Mar 23 2014

Examples

			4 is here because the difference between 10 and 14 is 4, and there is no smaller semiprimes with this property.
		

Crossrefs

Cf. A001358 (semiprimes), A131109, A215232, A217851.
Cf. A005250 (increasing gaps between primes).
Cf. A239673 (increasing gaps between sphenic numbers).

Programs

  • Haskell
    a215231 n = a215231_list !! (n-1)
    (a215231_list, a085809_list) = unzip $ (2, 1) : f 1 2 a065516_list where
       f i v (q:qs) | q > v = (q, i) : f (i + 1) q qs
                    | otherwise = f (i + 1) v qs
    -- Reinhard Zumkeller, Mar 23 2014
  • Mathematica
    SemiPrimeQ[n_Integer] := If[Abs[n] < 2, False, (2 == Plus @@ Transpose[FactorInteger[Abs[n]]][[2]])]; nextSemiprime[n_] := Module[{m = n + 1}, While[! SemiPrimeQ[m], m++]; m]; t = {{0, 0}}; s1 = nextSemiprime[1]; While[s1 < 10^7, s2 = nextSemiprime[s1]; d = s2 - s1; If[d > t[[-1, 1]], AppendTo[t, {d, s1}]; Print[{d, s1}]]; s1 = s2]; t = Rest[t]; Transpose[t][[1]]

Extensions

a(27)-a(31) from Donovan Johnson, Aug 07 2012
a(32)-a(38) from Donovan Johnson, Sep 20 2012

A246777 a(n) = A246776(A005669(n)): using the indices of maximal primes in A002386 in order to verify the Firoozbakht conjecture for 0 <= floor(prime(n)^(1+1/n)) - prime(n+1).

Original entry on oeis.org

1, 0, 0, 3, 10, 5, 16, 19, 20, 10, 38, 38, 35, 24, 43, 53, 38, 43, 66, 52, 46, 65, 79, 55, 73, 104, 109, 95, 120, 92, 130, 130, 121, 127, 114, 127, 155, 148, 92, 109, 159, 171, 173, 180, 171, 157, 171, 161, 174, 178, 168, 165, 169, 135, 171, 168, 138, 174, 195, 234, 149, 253, 269, 61, 244, 248, 255, 323, 304, 307, 262, 245, 234, 215, 228
Offset: 1

Views

Author

Farideh Firoozbakht, Sep 30 2014

Keywords

Comments

a(1) > 0 and a(n) >= 0 for n < 76; this implies "if p=p(k) is in the sequence A002386 and p <= 1425172824437699411 then p(k+1)^(1/(k+1)) < p(k)^(1/k)."

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{d, i, j, m = 0}, Reap@ For[i = 1, i <= n, i++, d = Prime[i + 1] - Prime@ i; If[d > m, m = d; Sow@ i, False]] // Flatten // Rest] (* A005669 *); g[n_] := Floor[Prime[n]^(1 + 1/n)] - Prime[n + 1] (* A246776 *); g@ f@ 100000; (* Michael De Vlieger, Mar 24 2015, with code from A246776 by Farideh Firoozbakht *)

Formula

a(n) = A246776(A005669(n)).

A063095 Record prime gap among first n+1 primes.

Original entry on oeis.org

1, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14
Offset: 1

Views

Author

Labos Elemer, Aug 07 2001

Keywords

Examples

			A value of d in this sequence persists until a larger value arises. Note that values like 10, 12, 16 are never maximal. Distinct, increasing prime gaps are given in A005250.
		

References

  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, 1996, Section VII.22, p. 249. (See G(x), which is an analog of pi(x).)

Crossrefs

Programs

  • Mathematica
    Table[Max[Table[Prime[w+1]-Prime[w], {w, 1, j}]], {j, 1, 500}] a(n)= Max{p[j+1]-p[j]; j=1, ..n}
  • Python
    from sympy import nextprime
    def A063095(n):
        c, p = 0, 2
        for i in range(n):
            q = nextprime(p)
            c, p = max(c,q-p), q
        return c # Chai Wah Wu, Sep 11 2019

A085237 Nondecreasing gaps between primes.

Original entry on oeis.org

1, 2, 2, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 8, 14, 14, 14, 18, 20, 22, 34, 34, 36, 36, 36, 44, 52, 52, 72, 86, 86, 96, 112, 114, 118, 132, 132, 148, 154, 154, 154, 180, 210, 220, 222, 234, 248, 250, 250, 282, 288, 292, 320, 336, 336, 354, 382, 384, 394, 456, 464, 468, 474, 486, 490, 500, 514, 516, 532, 534, 540, 582, 588, 602, 652, 674, 716, 766, 778
Offset: 1

Views

Author

Farideh Firoozbakht, Aug 11 2003

Keywords

Comments

All terms of A005250 are in the sequence, but some terms of A005250 appear in this sequence more than once.
a(n) is the gap between the n-th and (n+1)-th sublists of prime numbers defined in A348178. - Ya-Ping Lu, Oct 19 2021

Examples

			a(21) = a(22) = 34 because prime(218) - prime(217) = prime(1060) - prime(1059) = 34 and prime(n+1) - prime(n) is less than 34, for n < 1059 and n not equal to 217.
		

References

  • R. K. Guy, Unsolved problems in number theory.

Crossrefs

Programs

  • Mathematica
    f[n_] := Prime[n+1]-Prime[n]; v={}; Do[ If[f[n]>=If[n==1, 1, v[[ -1]]], v1=n; v=Append[v, f[v1]]; Print[v]], {n, 105000000}]
    DeleteDuplicates[Differences[Prime[Range[10^7]]],Greater] (* Harvey P. Dale, Jan 17 2024 *)
  • Python
    from sympy import nextprime; p, r = 2, 0
    while r < 778:
        q = nextprime(p); g = q - p
        if g >= r: print(g, end = ', '); r = g
        p = q # Ya-Ping Lu, Jan 23 2024

Extensions

a(53)-a(63) from Donovan Johnson, Nov 24 2008
a(64)-a(76) from Charles R Greathouse IV, May 09 2011
a(77)-a(79) from Charles R Greathouse IV, May 19 2011

A121069 Conjectured sequence for jumping champions greater than 1 (most common prime gaps up to x, for some x).

Original entry on oeis.org

2, 4, 6, 30, 210, 2310, 30030, 510510, 9699690, 223092870, 6469693230, 200560490130, 7420738134810, 304250263527210, 13082761331670030, 614889782588491410, 32589158477190044730, 1922760350154212639070
Offset: 1

Views

Author

Lekraj Beedassy, Aug 10 2006

Keywords

Comments

If n > 2, then a(n) = product of n-1 consecutive distinct prime divisors. E.g. a(5)=210, the product of 4 consecutive and distinct prime divisors, 2,3,5,7. - Enoch Haga, Dec 08 2007
From Bill McEachen, Jul 10 2022: (Start)
Rather than have code merely generating the conjectured values, one can compare values of sequence terms at the same position n. Specifically, locate new maximums where (p,p+even) are both prime, where even=2,4,6,8,... and the datum set is taken with even=4. A new maximum implies a new jumping champion.
Doing this produces the terms 2,4,6,30,210,2310,30030,.... Looking at the plot of a(n) ratio for gap=2/gap=6, the value changes VERY slowly, and is 2.14 after 50 million terms (one can see the trend via Plot 2 of A001359 vs A023201 (3rd option seqA/seqB vs n). The ratio for gap=4/gap=2 ~ 1, implying they are equally frequent. (End)

Crossrefs

Programs

  • Mathematica
    2,4,Table[Product[Prime[k],{k,1,n-1}],{n,3,30}]
  • PARI
    print1("2, 4");t=2;forprime(p=3,97,print1(", ",t*=p)) \\ Charles R Greathouse IV, Jun 11 2011

Formula

Consists of 4 and the primorials (A002110).
a(1) = 2, a(2) = 4, a(3) = 6, a(n+1)/a(n) = Prime[n] for n>2.

Extensions

Corrected and extended by Alexander Adamchuk, Aug 11 2006
Definition corrected and clarified by Jonathan Sondow, Aug 16 2011

A121492 Gaps associated with A002540(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 10, 12, 14, 20, 22, 30, 32, 34, 36, 44, 52, 72, 86, 96, 112, 114, 118, 132, 148, 154, 180, 210, 220, 222, 234, 248, 250, 282, 288, 292, 320, 336, 354, 382, 384, 394, 456, 464, 468, 474, 486, 490, 500, 514, 516, 532, 534, 540, 582, 588, 602
Offset: 1

Views

Author

Lekraj Beedassy, Aug 03 2006

Keywords

Comments

Record gaps between prime powers (A000961) [Michael B. Porter, Nov 01 2009].

Examples

			6 is in the sequence since 53 and 59 are consecutive prime powers and no smaller pair of consecutive prime powers differ by 6 or more. [From _Michael B. Porter_, Nov 03 2009]
		

Crossrefs

start of gap: A002540, end of gap: A167236, gaps: A057820 [From Michael B. Porter, Nov 03 2009]

Programs

  • PARI
    isA000961(n) = (omega(n) == 1 || n == 1)
    d_max=0;n_prev=1;for(n=2,1e6,if(isA000961(n),d=n-n_prev;if(d>d_max,print(d); d_max=d);n_prev=n)) /* Michael B. Porter, Nov 01 2009 */

Extensions

Second term corrected. a(20)-a(79) and b-file from Donovan Johnson, Nov 14 2008
Previous Showing 11-20 of 67 results. Next