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 34 results. Next

A231017 Least prime q > p = prime(n) such that if d = q-p, then p, p+d, p+2d, ..., p+(p-1)d are all primes.

Original entry on oeis.org

3, 5, 11, 157, 1536160091, 9918821194603, 341976204789992332577, 2166703103992332274919569
Offset: 1

Views

Author

Jonathan Sondow, Nov 08 2013

Keywords

Comments

Second term in the smallest non-constant p-term arithmetic progression (AP) of primes beginning with p = prime(n).
For any non-constant AP beginning with a prime p and ending with a prime, the maximum possible length is p, since p+pd is not prime for d > 0. If all the terms are prime, then the common difference d must be a multiple of all primes < p.
Ribenboim says that in 1986 G. Loh [Loeh] discovered a(5) and a(6), and that a(n) should exist for all n, but "in my opinion, this is so difficult that no one will prove [it], and no one will find a counterexample in the near future."
Phil Carmody found a(7) in 2001.
See the crossrefs for more comments, references, and links.

Examples

			Prime(3) = 5 and 5, 11, 17, 23, 29 is the smallest 5-term AP beginning with 5, so a(3) = 11.
		

References

  • P. Ribenboim, My Numbers, My Friends, Springer, 2000; p. 67.
  • P. Ribenboim, The Book of Prime Number Records, 2nd ed., Springer, 1989; p. 225.

Crossrefs

For common differences see A088430, for initial terms see A000040, for last terms see A113834, for the APs see A231406.
For other types of APs of primes see A005115 and its comments.

Programs

  • PARI
    a(n)=my(p=prime(n),P=prod(i=1,n-1,prime(i)),d); forprime(q=p+1,, d=q-p; if(d%P,next); for(i=2,p-1,if(!isprime(p+i*d), next(2))); return(q)) \\ Charles R Greathouse IV, Nov 08 2013

Formula

a(n) = prime(n) + A088430(n) = prime(n) + A002110(n)*A231018(n).

Extensions

a(8) found by Wojciech Izykowski, from Jens Kruse Andersen, Jun 30 2014

A273919 Number of 9-tuples of primes in arithmetic progression less than 10^n.

Original entry on oeis.org

0, 0, 0, 3, 57, 984, 22551
Offset: 1

Views

Author

Jean-Marc Rebert, Jun 04 2016

Keywords

Examples

			The least 9-tuple is {199, 409, 619, 829, 1039, 1249, 1459, 1669, 1879}, which is also the beginning of the least 10-tuple. This explains a(n)=0 for n<4.
		

References

Crossrefs

Cf. A113827 (prime beginning minimal n-tuple of primes in AP).

A273920 Number of 10-tuples of primes in arithmetic progression less than 10^n.

Original entry on oeis.org

0, 0, 0, 1, 5, 145, 2969
Offset: 1

Views

Author

Jean-Marc Rebert, Jun 04 2016

Keywords

Examples

			The least 10-tuple is {199, 409, 619, 829, 1039, 1249, 1459, 1669, 1879, 2089}, which explains a(4)=1 (and a(n)=0 for n<4).
		

References

Crossrefs

Cf. A113827 (prime beginning minimal n-tuple of primes in AP).

A273921 Number of 11-tuples of primes in arithmetic progression less than 10^n.

Original entry on oeis.org

0, 0, 0, 0, 0, 15, 253, 5561
Offset: 1

Views

Author

Jean-Marc Rebert, Jun 04 2016

Keywords

Examples

			The least 11-tuple is {110437, 124297, 138157, 152017, 165877, 179737, 193597, 207457, 221317, 235177, 249037} (this is also the beginning of the least 12-tuple). This is one of the 15 11-tuples corresponding to a(6)=15.
		

References

Crossrefs

Cf. A113827 (prime beginning minimal n-tuple of primes in AP).

A273922 Number of 12-tuples of primes in arithmetic progression less than 10^n.

Original entry on oeis.org

0, 0, 0, 0, 0, 6, 42, 715
Offset: 1

Views

Author

Jean-Marc Rebert, Jun 04 2016

Keywords

Examples

			The least 12-tuple is {110437, 124297, 138157, 152017, 165877, 179737, 193597, 207457, 221317, 235177, 249037, 262897}.
		

References

Crossrefs

Cf. A113827 (prime beginning minimal n-tuple of primes in AP).

A273923 Number of 13-tuples of primes in arithmetic progression less than 10^n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 3, 52
Offset: 1

Views

Author

Jean-Marc Rebert, Jun 04 2016

Keywords

Examples

			The least 13-tuple is {4943, 65003, 125063, 185123, 245183, 305243, 365303, 425363, 485423, 545483, 605543, 665603, 725663}.
		

References

Crossrefs

Cf. A113827 (prime beginning minimal n-tuple of primes in AP).

A354376 Smallest prime which is at the end of an arithmetic progression of exactly n primes.

Original entry on oeis.org

2, 3, 7, 43, 29, 157, 907, 2351, 5179, 2089, 375607, 262897, 725663, 36850999, 173471351, 198793279, 4827507229, 17010526363, 83547839407, 572945039351, 6269243827111
Offset: 1

Views

Author

Bernard Schott, May 24 2022

Keywords

Comments

Equivalently: Let i, i+d, i+2d, ..., i+(n-1)d be an arithmetic progression of exactly n primes; choose the one which minimizes the last term; then a(n) = last term i+(n-1)d.
The word "exactly" requires both i-d and i+n*d to be nonprime; without "exactly", we get A005115.
For the corresponding values of the first term, and the common difference, see A354377 and A354484. For the actual arithmetic progressions, see A354485.
The primes in these arithmetic progressions need not be consecutive. (The smallest prime at the start of a run of exactly n consecutive primes in arithmetic progression is A006560(n).)
a(n) != A005115(n), because A005115(n) + A093364(n) is prime for n = 4, 8, 9, 11. - Michael S. Branicky, May 24 2022

Examples

			The arithmetic progression (5, 11, 17, 23) with common difference 6 contains 4 primes, but 29 = 23+6 is also prime, hence a(4) != 23.
The arithmetic progression (7, 19, 31, 43) with common difference 12 also contains 4 primes, and 7-12 < 0 and 43+12 = 55 is composite; moreover this arithmetic progression is the smallest such progression with exactly 4 primes, hence a(4) = 43.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, A5, Arithmetic progressions of primes.

Crossrefs

Programs

  • Python
    from sympy import isprime, nextprime
    def a(n):
        if n < 3: return [2, 3][n-1]
        p = 2
        while True:
            for d in range(2, (p-3)//(n-1)+1, 2):
                if isprime(p+d) or isprime(p-n*d): continue
                if all(isprime(p-j*d) for j in range(1, n)): return p
            p = nextprime(p)
    print([a(n) for n in range(1, 11)]) # Michael S. Branicky, May 24 2022

Extensions

a(4) corrected and a(8)-a(13) from Michael S. Branicky, May 24 2022
a(14)-a(21) derived using A005115 and A093364 by Michael S. Branicky, May 24 2022

A373888 a(n) is the length of the longest arithmetic progression of primes ending with prime(n).

Original entry on oeis.org

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

Views

Author

Robert Israel, Aug 11 2024

Keywords

Comments

a(n) is the greatest k such that there exists d > 0 such that A000040(n) - j*d is prime for j = 0 .. k-1.
The first appearance of m in this sequence is at A000720(A005115(m)).
Conjectures: a(n) >= 3 for n >= 13.
Limit_{n -> oo} a(n) = oo.

Examples

			a(4) = 3 because the 4th prime is 7 and there is an arithmetic progression of 3 primes ending in 7, namely 3, 5, 7, and no such arithmetic progression of 4 primes.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local s,i,m,d,j;
      m:= 1;
      s:= ithprime(n);
      for i from n-1 to 1 by -1 do
        d:= s - ithprime(i);
        if s - m*d < 2 then return m fi;
        for j from 2 while isprime(s-j*d) do od;
        m:= max(m, j);
      od;
      m
    end proc:
    map(f, [$1..100]);

A278735 Smallest prime-indexed prime ending an arithmetic progression of n prime-indexed primes.

Original entry on oeis.org

3, 5, 17, 587, 47857, 7336423, 785979097
Offset: 1

Views

Author

Bobby Jacobs, Nov 27 2016

Keywords

Comments

The first set of 4 prime-indexed primes in arithmetic progression (353, 431, 509, and 587) contains consecutive terms of A142160.

Examples

			a(4) = 587 because 353 = prime(prime(20)), 431 = prime(prime(23)), 509 = prime(prime(25)), 587 = prime(prime(28)), and 431-353 = 509-431 = 587-509 = 78.
From _Charles R Greathouse IV_, Nov 27 2016: (Start)
The corresponding arithmetic progressions are
3;
3, 5;
5, 11, 17;
353, 431, 509, 587;
13297, 21937, 30577, 39217, 47857;
1561423, 2716423, 3871423, 5026423, 6181423, 7336423;
and with the main diagonal being terms of this sequence. (End)
		

Crossrefs

Right border of A279021.

Programs

  • PARI
    findAP(len)=my(t); if(len<3, return(v[len])); for(i=len, #v, for(j=1, i-len+1, t=(v[i]-v[j])/(len-1); if(denominator(t)>1, next); forstep(k=v[j]+t, v[i]-t, t, if(!setsearch(v, k), next(2))); return(vector(len, k, v[j]+(k-1)*t)))); "not found"
    listPIP(lim)=my(v=List(), p); forprime(q=2, lim, if(isprime(p++), listput(v, q))); Vec(v)
    v=listPIP(1e7);
    apply(findAP, [1..6]) \\ Charles R Greathouse IV, Nov 27 2016

Extensions

a(7) from Charles R Greathouse IV, Dec 27 2016

A113459 Least number that begins an arithmetic progression of n numbers with the same prime signature.

Original entry on oeis.org

1, 2, 3, 5, 5, 7, 7, 11, 11, 11, 11, 13
Offset: 1

Views

Author

David Wasserman, Jan 08 2006

Keywords

Comments

Initial terms of arithmetic progressions described in A113460. - N. J. A. Sloane, Oct 18 2007
Conjecture: For n > 1, a(n) = A007918(n). - David Wasserman, Jan 08 2006
I disagree with that conjecture! Ignoring the initial terms, this will agree with A007918 up to some point and then (presumably) drop below A007918. The initial term in the arithmetic progression (of length n) must be >= n, but it is likely to be less than A007918(n) if n is large. - N. J. A. Sloane, Oct 18 2007

Crossrefs

Extensions

Edited by N. J. A. Sloane, Jul 01 2008 at the suggestion of R. J. Mathar.
Previous Showing 11-20 of 34 results. Next