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-10 of 31 results. Next

A092409 Erroneous version of A007921.

Original entry on oeis.org

7, 13, 19, 23, 25, 31, 33, 37, 43, 47, 49, 53, 55, 61, 63, 67, 73, 75, 79, 83, 85, 91, 93, 97
Offset: 1

Views

Author

Keywords

Comments

89 is missing.

References

  • Florentin Smarandache, "Sequences of Numbers involved in Unsolved Problems," Phoenix, 2006.

A001223 Prime gaps: differences between consecutive primes.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

There is a unique decomposition of the primes: provided the weight A117078(n) is > 0, we have prime(n) = weight * level + gap, or A000040(n) = A117078(n) * A117563(n) + a(n). - Rémi Eismann, Feb 14 2008
Let rho(m) = A179196(m), for any n, let m be an integer such that p_(rho(m)) <= p_n and p_(n+1) <= p_(rho(m+1)), then rho(m) <= n < n + 1 <= rho(m + 1), therefore a(n) = p_(n+1) - p_n <= p_rho(m+1) - p_rho(m) = A182873(m). For all rho(m) = A179196(m), a(rho(m)) < A165959(m). - John W. Nicholson, Dec 14 2011
A solution (modular square root) of x^2 == A001248(n) (mod A000040(n+1)). - L. Edson Jeffery, Oct 01 2014
There exists a constant C such that for n -> infinity, Cramer conjecture a(n) < C log^2 prime(n) is equivalent to (log prime(n+1)/log prime(n))^n < e^C. - Thomas Ordowski, Oct 11 2014
a(n) = A008347(n+1) - A008347(n-1). - Reinhard Zumkeller, Feb 09 2015
Yitang Zhang proved lim inf_{n -> infinity} a(n) is finite. - Robert Israel, Feb 12 2015
lim sup_{n -> infinity} a(n)/log^2 prime(n) = C <==> lim sup_{n -> infinity}(log prime(n+1)/log prime(n))^n = e^C. - Thomas Ordowski, Mar 09 2015
a(A038664(n)) = 2*n and a(m) != 2*n for m < A038664(n). - Reinhard Zumkeller, Aug 23 2015
If j and k are positive integers then there are no two consecutive primes gaps of the form 2+6j and 2+6k (A016933) or 4+6j and 4+6k (A016957). - Andres Cicuttin, Jul 14 2016
Conjecture: For any positive numbers x and y, there is an index k such that x/y = a(k)/a(k+1). - Andres Cicuttin, Sep 23 2018
Conjecture: For any three positive numbers x, y and j, there is an index k such that x/y = a(k)/a(k+j). - Andres Cicuttin, Sep 29 2018
Conjecture: For any three positive numbers x, y and j, there are infinitely many indices k such that x/y = a(k)/a(k+j). - Andres Cicuttin, Sep 29 2018
Row m of A174349 lists all indices n for which a(n) = 2m. - M. F. Hasler, Oct 26 2018
Since (6a, 6b) is an admissible pattern of gaps for any integers a, b > 0 (and also if other multiples of 6 are inserted in between), the above conjecture follows from the prime k-tuple conjecture which states that any admissible pattern occurs infinitely often (see, e.g., the Caldwell link). This also means that any subsequence a(n .. n+m) with n > 2 (as to exclude the untypical primes 2 and 3) should occur infinitely many times at other starting points n'. - M. F. Hasler, Oct 26 2018
Conjecture: Defining b(n,j,k) as the number of pairs of prime gaps {a(i),a(i+j)} such that i < n, j > 0, and a(i)/a(i+j) = k with k > 0, then
lim_{n -> oo} b(n,j,k)/b(n,j,1/k) = 1, for any j > 0 and k > 0, and
lim_{n -> oo} b(n,j,k1)/b(n,j,k2) = C with C = C(j,k1,k2) > 0. - Andres Cicuttin, Sep 01 2019

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • GCHQ, The GCHQ Puzzle Book, Penguin, 2016. See page 92.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 186-192.
  • 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 (primes), A001248 (primes squared), A000720, A037201, A007921, A030173, A036263-A036274, A167770, A008347.
Second difference is A036263, first occurrence is A000230.
For records see A005250, A005669.
Sequences related to the differences between successive primes: A001223 (Delta(p)), A028334, A080378, A104120, A330556-A330561.

Programs

  • Haskell
    a001223 n = a001223_list !! (n-1)
    a001223_list = zipWith (-) (tail a000040_list) a000040_list
    -- Reinhard Zumkeller, Oct 29 2011
    
  • Magma
    [(NthPrime(n+1) - NthPrime(n)): n in [1..100]]; // Vincenzo Librandi, Apr 02 2011
    
  • Maple
    with(numtheory): for n from 1 to 500 do printf(`%d,`,ithprime(n+1) - ithprime(n)) od:
  • Mathematica
    Differences[Prime[Range[100]]] (* Harvey P. Dale, May 15 2011 *)
  • PARI
    diff(v)=vector(#v-1,i,v[i+1]-v[i]);
    diff(primes(100)) \\ Charles R Greathouse IV, Feb 11 2011
    
  • PARI
    forprime(p=1, 1e3, print1(nextprime(p+1)-p, ", ")) \\ Felix Fröhlich, Sep 06 2014
    
  • Python
    from sympy import prime
    def A001223(n): return prime(n+1)-prime(n) # Chai Wah Wu, Jul 07 2022
  • Sage
    differences(prime_range(1000)) # Joerg Arndt, May 15 2011
    

Formula

G.f.: b(x)*(1-x), where b(x) is the g.f. for the primes. - Franklin T. Adams-Watters, Jun 15 2006
a(n) = prime(n+1) - prime(n). - Franklin T. Adams-Watters, Mar 31 2010
Conjectures: (i) a(n) = ceiling(prime(n)*log(prime(n+1)/prime(n))). (ii) a(n) = floor(prime(n+1)*log(prime(n+1)/prime(n))). (iii) a(n) = floor((prime(n)+prime(n+1))*log(prime(n+1)/prime(n))/2). - Thomas Ordowski, Mar 21 2013
A167770(n) == a(n)^2 (mod A000040(n+1)). - L. Edson Jeffery, Oct 01 2014
a(n) = Sum_{k=1..2^(n+1)-1} (floor(cos^2(Pi*(n+1)^(1/(n+1))/(1+primepi(k))^(1/(n+1))))). - Anthony Browne, May 11 2016
G.f.: (Sum_{k>=1} x^pi(k)) - 1, where pi(k) is the prime counting function. - Benedict W. J. Irwin, Jun 13 2016
Conjecture: Limit_{N->oo} (Sum_{n=2..N} log(a(n))) / (Sum_{n=2..N} log(log(prime(n)))) = 1. - Alain Rocchelli, Dec 16 2022
Conjecture: The asymptotic limit of the average of log(a(n)) ~ log(log(prime(n))) - gamma (where gamma is Euler's constant). Also, for n tending to infinity, the geometric mean of a(n) is equivalent to log(prime(n)) / e^gamma. - Alain Rocchelli, Jan 23 2023
It has been conjectured that primes are distributed around their average spacing in a Poisson distribution (cf. D. A. Goldston in above links). This is the basis of the last two conjectures above. - Alain Rocchelli, Feb 10 2023

Extensions

More terms from James Sellers, Feb 19 2001

A053289 First differences of consecutive perfect powers (A001597).

Original entry on oeis.org

3, 4, 1, 7, 9, 2, 5, 4, 13, 15, 17, 19, 21, 4, 3, 16, 25, 27, 20, 9, 18, 13, 33, 35, 19, 18, 39, 41, 43, 28, 17, 47, 49, 51, 53, 55, 57, 59, 61, 39, 24, 65, 67, 69, 71, 35, 38, 75, 77, 79, 81, 47, 36, 85, 87, 89, 23, 68, 71, 10, 12, 95, 97, 99, 101, 103, 40, 65, 107, 109, 100
Offset: 1

Views

Author

Labos Elemer, Mar 03 2000

Keywords

Comments

Michel Waldschmidt writes: Conjecture 1.3 (Pillai). Let k be a positive integer. The equation x^p - y^q = k where the unknowns x, y, p and q take integer values, all >= 2, has only finitely many solutions (x,y,p,q). This means that in the increasing sequence of perfect powers [A001597] the difference between two consecutive terms [the present sequence] tends to infinity. It is not even known whether for, say, k=2, Pillai's equation has only finitely many solutions. A related open question is whether the number 6 occurs as a difference between two perfect powers. See Sierpiński [1970], problem 238a, p. 116. - Jonathan Vos Post, Feb 18 2008
Are there are any adjacent equal terms? - Gus Wiseman, Oct 08 2024

Examples

			Consecutive perfect powers are A001597(14) = 121, A001597(13) = 100, so a(13) = 121 - 100 = 21.
		

References

  • Wacław Sierpiński, 250 problems in elementary number theory, Modern Analytic and Computational Methods in Science and Mathematics, No. 26, American Elsevier, Warsaw, 1970, pp. 21, 115-116.
  • S. S. Pillai, On the equation 2^x - 3^y = 2^X - 3^Y, Bull, Calcutta Math. Soc. 37 (1945) 15-20.

Crossrefs

For non-perfect-powers (A007916) we have A375706.
The union is A023055.
For prime-powers (A000961 or A246655) we have A057820.
Sorted positions of first appearances are A376268, complement A376519.
For second differences we have A376559.
Ascending and descending points are A376560 and A376561.
A001597 lists perfect-powers.
A112344 counts integer partitions into perfect-powers, factorizations A294068.
A333254 gives run-lengths of differences between consecutive primes.

Programs

  • Mathematica
    Differences@ Select[Range@ 3200, # == 1 || GCD @@ FactorInteger[#][[All, 2]] > 1 &] (* Michael De Vlieger, Jun 30 2016, after Ant King at A001597 *)
  • Python
    from sympy import mobius, integer_nthroot
    def A053289(n):
        if n==1: return 3
        def f(x): return int(n-2+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        kmin, kmax = 1,2
        while f(kmax)+1 >= kmax:
            kmax <<= 1
        rmin, rmax = 1, kmax
        while True:
            kmid = kmax+kmin>>1
            if f(kmid)+1 < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        while True:
            rmid = rmax+rmin>>1
            if f(rmid) < rmid:
                rmax = rmid
            else:
                rmin = rmid
            if rmax-rmin <= 1:
                break
        return kmax-rmax # Chai Wah Wu, Aug 13 2024

Formula

a(n) = A001597(n+1) - A001597(n). - Jonathan Vos Post, Feb 18 2008
From Amiram Eldar, Jun 30 2023: (Start)
Formulas from Jakimczuk (2016):
Lim sup_{n->oo} a(n)/(2*n) = 1.
Lim inf_{n->oo} a(n)/(2*n)^(2/3 + eps) = 0. (End)
Can be obtained by inserting 0 between 3 and 6 in A375702 and then adding 1 to all terms. In particular, for n > 2, a(n+1) - 1 = A375702(n). - Gus Wiseman, Sep 14 2024

A005381 Numbers k such that k and k-1 are composite.

Original entry on oeis.org

9, 10, 15, 16, 21, 22, 25, 26, 27, 28, 33, 34, 35, 36, 39, 40, 45, 46, 49, 50, 51, 52, 55, 56, 57, 58, 63, 64, 65, 66, 69, 70, 75, 76, 77, 78, 81, 82, 85, 86, 87, 88, 91, 92, 93, 94, 95, 96, 99, 100, 105, 106, 111, 112, 115, 116, 117, 118, 119, 120, 121, 122
Offset: 1

Views

Author

Keywords

Comments

Position where the composites first outnumber the primes by n, among the first natural numbers. - Lekraj Beedassy, Jul 11 2006

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 844.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Equals A068780 + 1. Cf. A007921.
Cf. A093515 (complement, apart from 1 which is in neither sequence), A323162 (characteristic function).

Programs

  • Maple
    isA005381 := proc(n)
        not isprime(n) and not isprime(n-1) ;
    end proc:
    A005381 := proc(n)
        local a;
        option remember;
        if n = 1 then
            9;
        else
            for a from procname(n-1)+1 do
                if isA005381(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Jul 14 2015
    # second Maple program:
    q:= n-> ormap(isprime, [n, n-1]):
    remove(q, [$2..130])[];  # Alois P. Heinz, Dec 26 2021
  • Mathematica
    Select[Range[2, 200], ! PrimeQ[# - 1] && ! PrimeQ[#] &]
  • PARI
    is(n)=!isprime(n)&&!isprime(n-1) \\ M. F. Hasler, Jan 07 2019
    
  • Python
    from sympy import isprime
    def ok(n): return n > 3 and not isprime(n) and not isprime(n-1)
    print([k for k in range(122) if ok(k)]) # Michael S. Branicky, Dec 26 2021

Formula

Conjecture: pi(n)=Sum_{k=1..n} k mod a(m) mod a(m-1) ... mod a(1) mod 2, for all values 1Benedict W. J. Irwin, May 04 2016
As a check, take n=9, m=2, a(m)=10. Then we must take the numbers 1 through 9 and reduce them mod 10 then mod 9 then mod 2. The results are 1,0,1,0,1,0,1,0,0, whose sum is 4 = pi(9), as predicted. - N. J. A. Sloane, May 05 2016
For an attempt at a proof for the conjecture above, see the link. If it is true, then for n>2, isprime(n)=(n mod x) mod 2, where x is the largest a(n)<=n. - Benedict W. J. Irwin, May 06 2016

A037201 Differences between consecutive primes (A001223) but with repeats omitted.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Also the run-compression of the sequence of first differences of prime numbers, where we define the run-compression of a sequence to be the anti-run obtained by reducing each run of repeated parts to a single part. Alternatively, we can remove all parts equal to the part immediately to their left. For example, (1,1,2,2,1) has run-compression (1,2,1). - Gus Wiseman, Sep 16 2024

Crossrefs

This is the run-compression of A001223 = first differences of A000040.
The repeats were at positions A064113 before being omitted.
Adding up runs instead of compressing them gives A373822.
The even terms halved are A373947.
For prime-powers instead of prime numbers we have A376308.
Positions of first appearances are A376520, sorted A376521.
A003242 counts compressed compositions.
A333254 lists run-lengths of differences between consecutive primes.
A373948 encodes compression using compositions in standard order.

Programs

  • Haskell
    a037201 n = a037201_list !! (n-1)
    a037201_list = f a001223_list where
       f (x:xs@(x':_)) | x == x'   = f xs
                       | otherwise = x : f xs
    -- Reinhard Zumkeller, Feb 27 2012
    
  • Mathematica
    Flatten[Split[Differences[Prime[Range[150]]]]/.{(k_)..}:>k] (* based on a program by Harvey P. Dale, Jun 21 2012 *)
  • PARI
    t=0;p=2;forprime(q=3,1e3,if(q-p!=t,print1(q-p", "));t=q-p;p=q) \\ Charles R Greathouse IV, Feb 27 2012

Formula

a(n>1) = 2*A373947(n-1). - Gus Wiseman, Sep 16 2024

Extensions

Offset corrected by Reinhard Zumkeller, Feb 27 2012

A206037 Values of the difference d for 3 primes in arithmetic progression with the minimal start sequence {3 + j*d}, j = 0 to 2.

Original entry on oeis.org

2, 4, 8, 10, 14, 20, 28, 34, 38, 40, 50, 64, 68, 80, 94, 98, 104, 110, 124, 134, 154, 164, 178, 188, 190, 208, 220, 230, 238, 248, 260, 280, 308, 314, 328, 344, 370, 418, 428, 430, 440, 454, 458, 484, 518, 544, 560, 574, 584, 610, 614, 628, 638, 640, 644, 650
Offset: 1

Views

Author

Sameen Ahmed Khan, Feb 03 2012

Keywords

Comments

The computations were done without any assumptions on the form of d.
Numbers k such that k+3 and 2k+3 are both primes.
Equivalently, integers d such that the largest possible arithmetic progression (AP) of primes with common difference d has exactly 3 elements (see example). These 3 elements are not necessarily consecutive primes. In fact, for each term d, there exists only one such AP of primes, and this one starts always with A342309(d) = 3, so this AP is (3, 3+d, 3+2d). - Bernard Schott, Jan 15 2023

Examples

			d = 8 then {3, 3 + 1*8, 3 + 2*8} = {3, 11, 19}, which is 3 primes in arithmetic progression.
		

Crossrefs

Largest AP of prime numbers with k elements: A007921 (k=1), A359408 (k=2), this sequence (k=3), A359409 (k=4), A206039 (k=5), A359410 (k=6), A206041 (k=7).

Programs

  • Magma
    [n: n in [1..700] | IsPrime(3+n) and IsPrime(3+2*n)]; // Vincenzo Librandi, Dec 28 2015
  • Maple
    filter := d -> isprime(3+d) and isprime(3+2*d) : select(filter, [$(1 .. 650)]); # Bernard Schott, Jan 16 2023
  • Mathematica
    t={}; Do[If[PrimeQ[{3, 3 + d, 3 + 2*d}] == {True, True, True}, AppendTo[t, d]], {d, 1000}]; t
    Select[Range[2,700,2],And@@PrimeQ[{3+#,3+2#}]&] (* Harvey P. Dale, Sep 25 2013 *)
  • PARI
    for(n=1, 1e3, if(isprime(n + 3) && isprime(2*n + 3), print1(n, ", "))); \\ Altug Alkan, Dec 27 2015
    

Formula

a(n) = 2 * A115334(n). - Wesley Ivan Hurt, Feb 06 2014
m is a term iff A123556(m) = 3. - Bernard Schott, Jan 15 2023

A123556 Number of elements in longest possible arithmetic progression of primes with difference n.

Original entry on oeis.org

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

Views

Author

David W. Wilson, Nov 15 2006, revised Nov 25 2006

Keywords

Comments

Length of n-th row of A124064.
The corresponding smallest term of the first such longest possible arithmetic progression of primes with common difference n is A342309(n). - Bernard Schott, Oct 12 2021
From Bernard Schott, Feb 24 2023: (Start)
For every positive integer n, there exists a smallest prime p that does not divide n = A053669(n); then, an AP of k primes with common difference n cannot contain more terms than this value of p so k <= p, moreover, the longest possible APs of primes have p-1 or p elements.
Proof: consider the AP of p elements (q, q+n, q+2*n, q+3*n, ..., q+(p-1)*n) with common difference n, q prime and p is the smallest prime that does not divide n; the modular arithmetic modulo p gives this set of remainders with p elements: {0, 1, 2, ..., p-1}, so there is always a multiple of p in each such AP with p terms, hence length k of longest possible AP of primes is >= p-1 and <= p.
Moreover, when the longest possible AP contains k = p elements, then this unique longest AP must start with p (corresponding to remainder = 0) and the common difference n is a multiple of A151799(p)# and not of p#, where # = primorial = A002110.
Now, always with a common difference n, when the longest possible AP contains k = p-1 elements, these longest APs with p-1 primes can start with p or with another prime q != p, and there are infinitely many such longest APs with p-1 terms (see Properties in Wikipedia link) in this case. When this AP starts with p, the set of remainders is {0, 1, ..., p-2} and when this AP starts with q, then the set of remainders becomes {1, 2, ..., p-1}.
Terms are ordered without repetition in A173919. (End)

Examples

			a(1) = 2 for the AP (arithmetic progression) (2, 3) with A342309(1) = 2.
a(2) = 3 for the AP (3, 5, 7) with A342309(2) = 3.
a(3) = 2 for the AP (2, 5) with A342309(3) = 2.
a(6) = 5 for the AP (5, 11, 17, 23, 29) with A342309(6) = 5.
a(7) = 1 for the AP (2) with A342309(7) = 2.
a(18) = 4 for the AP (5, 23, 41, 59) with A342309(18) = 5.
a(30) = 6 for the AP (7, 37, 67, 97, 127, 157) with A342309(30) = 7.
a(150) = 7 for the AP (7, 157, 307, 457, 607, 757, 907) with A342309(150) = 7.
From _Bernard Schott_, Feb 25 2023: (Start)
For n = 12, p = A053669(12) = 5 and the AP (5, 17, 29, 41, 53) has 5 elements that are primes (the next should be 65 = 5*13), so a(12) = 5. This AP is the unique longest possible AP of primes with a common difference n = 12.
For n = 30, p = A053669(30) = 7 and the AP (7, 37, 67, 97, 127, 157) has 7-1 = 6 elements that are primes (the next should be 187 = 11*17) so a(30) = 6. Also, there are infinitely many such longest APs with common difference 30 and 6 elements. These other longest APs start with primes q that are > p = 7. The first few next q are 107, 359, 541, 2221, 6673, 7457, ...
For n = 60, p = A053669(60) = 7 and the longest AP that starts with 7 is (7, 67, 127) has only 3 elements that are primes (the next should be 187 = 11*17) so a(60) = 6. Also, there are infinitely many such longest APs with common difference 60 and 6 elements. All these longest APs start with primes q that are > p = 7. The first few such q are 11, 53, 641, 5443, 10091, 12457, ... and the smallest such AP is (11, 71, 131, 191, 251, 311). (End)
		

Crossrefs

Sequences such that a(n) = k iff ...: A007921 (a(n)=1), A359408 (a(n)=2), A206037 (a(n)=3), A359409 (a(n)=4), A206039 (a(n)=5), A359410 (a(n)=6), A206041 (a(n)=7), A360146 (a(n)=10), A206045 (a(n)=11).

Programs

  • PARI
    A053669(n) = forprime(p=2, , if(n%p, return(p)));
    a(n) = my(p=A053669(n)); for (i=1, p-1, if (!isprime(p+i*n), return(p-1))); p; \\ Michel Marcus, Feb 26 2023

Formula

Assume the k-tuples conjecture. Let p = A053669(n). If the arithmetic progression of p elements starting at p with difference n consists of primes, then a(n) = p, otherwise a(n) = p-1.

A206045 Numbers d such that 11 + j*d is prime for j = 0 to 10.

Original entry on oeis.org

1536160080, 4911773580, 25104552900, 77375139660, 83516678490, 100070721660, 150365447400, 300035001630, 318652145070, 369822103350, 377344636200, 511688932650, 580028072610, 638663371710, 701534299830, 745828915650, 776625236100, 883476548850, 925639075620, 956863233690
Offset: 1

Views

Author

Sameen Ahmed Khan, Feb 03 2012

Keywords

Comments

Original name: Values of the difference d for 11 primes in arithmetic progression with the minimal start sequence {11 + j*d}, j = 0 to 10.
The computations were done without any assumptions on the form of d. 21st term is greater than 10^12.
All terms are multiples of 210=2*3*5*7. - Zak Seidov, May 16 2015
Equivalently, integers d such that the longest possible arithmetic progression (AP) of primes with common difference d has exactly 11 elements (see example). These 11 elements are not necessarily consecutive primes. In fact, here, for each term d, there exists only one such AP of primes, and this one always starts with A342309(d) = 11, so this unique AP is (11, 11+d, 11+2d, 11+3d, 11+4d, 11+5d, 11+6d, 11+7d, 11+8d, 11+9d, 11+10d). - Bernard Schott, Mar 08 2023

Examples

			d = 4911773580 then {11, 4911773591, 9823547171, 14735320751, 19647094331, 24558867911, 29470641491, 34382415071, 39294188651, 44205962231, 49117735811} which is 11 primes in arithmetic progression.
		

References

  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 139.

Crossrefs

Common differences for longest possible APs of primes with exactly k elements: A007921 (k=1), A359408 (k=2), A206037 (k=3), A359409 (k=4), A206039 (k=5), A359410 (k=6), A206041 (k=7), A360146 (k=10), this sequence (k=11).

Programs

  • Mathematica
    a = 11; Do[If[PrimeQ[{a, a + d, a + 2*d, a + 3*d, a + 4*d, a + 5*d, a + 6*d, a + 7*d, a + 8*d, a + 9*d, a + 10*d}] == {True, True, True, True, True, True, True, True, True, True, True}, Print[d]], {d, 210,10^12, 210}] (* corrected by Zak Seidov, May 16 2015 *)
    Select[Range[210,10^12,210],AllTrue[Range[0,10]#+11,PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 28 2016 *)
  • PARI
    is(n)=for(j=1,10, if(!isprime(j*n+11), return(0))); 1 \\ Charles R Greathouse IV, May 18 2015

Formula

m is a term iff A123556(m) = 11. - Bernard Schott, Mar 08 2023

Extensions

New name from Charles R Greathouse IV, May 18 2015

A030173 Differences p(i)-p(j) between primes, sorted in numerical order.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 20, 21, 22, 24, 26, 27, 28, 29, 30, 32, 34, 35, 36, 38, 39, 40, 41, 42, 44, 45, 46, 48, 50, 51, 52, 54, 56, 57, 58, 59, 60, 62, 64, 65, 66, 68, 69, 70, 71, 72, 74, 76, 77, 78, 80, 81, 82, 84, 86, 87, 88, 90
Offset: 1

Views

Author

Alexander Grasser [Graesser] (alex(AT)computicket.com)

Keywords

Comments

Conjectured (Polignac 1849) to be union of even numbers and the odd primes minus 2.
For n > 2: A092953(a(n)) > 0. - Reinhard Zumkeller, Nov 10 2012

Crossrefs

Complement of A007921. Cf. A001223, A005843, A040976.

Programs

  • Haskell
    import Data.List.Ordered (union)
    a030173 n = a030173_list !! (n-1)
    a030173_list = union [2, 4 ..] $ tail a040976_list
    -- Reinhard Zumkeller, Jul 03 2015
  • Mathematica
    nn = 90; Union[Range[2, nn, 2], Prime[Range[2, PrimePi[nn+2]]] - 2]
  • PARI
    print1(1);p=3;forprime(q=5,1e3,forstep(n=p-1,q-3,2,print1(", "n));print1(", ",q-2);p=q) \\ conjectural; Charles R Greathouse IV, Jul 02 2011
    
  • PARI
    isOK(n)=if(n%2,isprime(n+2),forprime(p=3,,isprime(n+p)&&return(1)));
    for(n=1,10^100,isOK(n)&print1(n,", ")) \\ unconditionally outputs correct values only, will "hang" forever if conjecture is false once that exceptional even number is reached; Jeppe Stig Nielsen, Sep 23 2015
    

A206039 Values of the difference d for 5 primes in arithmetic progression with the minimal start sequence {5 + j*d}, j = 0 to 4.

Original entry on oeis.org

6, 12, 42, 48, 96, 126, 252, 426, 474, 594, 636, 804, 1218, 1314, 1428, 1566, 1728, 1896, 2106, 2574, 2694, 2898, 3162, 3366, 4332, 4368, 4716, 4914, 4926, 4962, 5472, 5586, 5796, 5838, 6048, 7446, 7572, 7818, 8034, 8958, 9168, 9204, 9714
Offset: 1

Views

Author

Sameen Ahmed Khan, Feb 03 2012

Keywords

Comments

The computations were done without any assumptions on the form of d.
All terms are multiples of 6. - Zak Seidov, Jan 07 2014
Equivalently, integers d such that the largest possible arithmetic progression (AP) of primes with common difference d has exactly 5 elements (see example). These 5 elements are not necessarily consecutive primes. In fact, for each term d, there exists only one such AP of primes, and this one always starts with A342309(d) = 5, so this unique AP is (5, 5+d, 5+2d, 5+3d, 5+4d). - Bernard Schott, Jan 25 2023

Examples

			d = 12 then {5, 5 + 1*12, 5 + 2*12, 5 + 3*12, 5 + 4*12} = {5, 17, 29, 41, 53}, which is 5 primes in arithmetic progression.
		

Crossrefs

Largest AP of prime numbers with exactly k elements: A007921 (k=1), A359408 (k=2), A206037 (k=3), A359409 (k=4), this sequence (k=5), A359410 (k=6), A206041 (k=7), A360146 (k=10), A206045 (k=11).

Programs

  • Maple
    filter := d -> isprime(5+d) and isprime(5+2*d) and isprime(5+3*d) and isprime(5+4*d) : select(filter, [$(1 .. 10000)]); # Bernard Schott, Jan 25 2023
  • Mathematica
    t={}; Do[If[PrimeQ[{5, 5 + d, 5 + 2*d, 5 + 3*d, 5 +4*d}] == {True, True, True, True, True}, AppendTo[t, d]], {d, 10000}]; t
    Select[Range[10000],AllTrue[5+#*Range[0,4],PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 09 2015 *)

Formula

m is a term iff A123556(m) = 3. - Bernard Schott, Jan 25 2023
Showing 1-10 of 31 results. Next