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

A120302 Last term of arithmetic progression of primes described in A130791, A007918, A061558.

Original entry on oeis.org

2, 3, 7, 23, 29, 157, 907, 8471621, 261369371
Offset: 1

Views

Author

N. J. A. Sloane, Oct 17 2007

Keywords

Crossrefs

Apart from leading term, agrees with A127781 for many terms. Where is the first difference?

A151800 Least prime > n (version 2 of the "next prime" function).

Original entry on oeis.org

2, 2, 3, 5, 5, 7, 7, 11, 11, 11, 11, 13, 13, 17, 17, 17, 17, 19, 19, 23, 23, 23, 23, 29, 29, 29, 29, 29, 29, 31, 31, 37, 37, 37, 37, 37, 37, 41, 41, 41, 41, 43, 43, 47, 47, 47, 47, 53, 53, 53, 53, 53, 53, 59, 59, 59, 59, 59, 59, 61, 61, 67, 67, 67, 67, 67, 67, 71, 71, 71, 71, 73, 73, 79
Offset: 0

Views

Author

N. J. A. Sloane, Jun 29 2009

Keywords

Comments

Version 1 of the "next prime" function is A007918: smallest prime >= n.
Maple's nextprime() is this version 2; PARI/GP's nextprime() is version 1.
See A007918 for references and further information.
a(n) is the smallest number greater than one that is not divisible by any 1 < k <= n. Consider a multi-round election in which, in each round, voters each cast one vote for one of the remaining candidates. Then, any candidates which receive the fewest votes in that round are eliminated. This repeats until either one candidate remains, who wins the election, or no candidates remain. a(n) is the smallest nontrivial number of voters that can guarantee a winner if the election initially has n > 0 candidates. This is a consequence of the first fact. - Thomas Anton, Mar 30 2020
Conjecture: if n > 3, then a(n) < n^(n^(1/n)). - Thomas Ordowski, Feb 23 2023

Crossrefs

Programs

Formula

a(n) = A007918(n+1).
a(n) = 1 + Sum_{k=1..2n} (floor((n!^k)/k!) - floor(((n!^k)-1)/k!)). - Anthony Browne, May 11 2016
a(n) = A000040(A036234(n)). - Ridouane Oudra, Sep 30 2024

A007918 Least prime >= n (version 1 of the "next prime" function).

Original entry on oeis.org

2, 2, 2, 3, 5, 5, 7, 7, 11, 11, 11, 11, 13, 13, 17, 17, 17, 17, 19, 19, 23, 23, 23, 23, 29, 29, 29, 29, 29, 29, 31, 31, 37, 37, 37, 37, 37, 37, 41, 41, 41, 41, 43, 43, 47, 47, 47, 47, 53, 53, 53, 53, 53, 53, 59, 59, 59, 59, 59, 59, 61, 61, 67, 67, 67, 67, 67, 67, 71, 71, 71, 71, 73, 73
Offset: 0

Views

Author

R. Muller and Charles T. Le (charlestle(AT)yahoo.com)

Keywords

Comments

Version 2 of the "next prime" function is "smallest prime > n". This produces A151800.
Maple uses version 2.
According to the "k-tuple" conjecture, a(n) is the initial term of the lexicographically earliest increasing arithmetic progression of n primes; the corresponding common differences are given by A061558. - David W. Wilson, Sep 22 2007
It is easy to show that the initial term of an increasing arithmetic progression of n primes cannot be smaller than a(n). - N. J. A. Sloane, Oct 18 2007
Also, smallest prime bounded by n and 2n inclusively (in accordance with Bertrand's theorem). Smallest prime >n is a(n+1) and is equivalent to smallest prime between n and 2n exclusively. - Lekraj Beedassy, Jan 01 2007
Run lengths of successive equal terms are given by A125266. - Felix Fröhlich, May 29 2022
Conjecture: if n > 1, then a(n) < n^(n^(1/n)). - Thomas Ordowski, Feb 23 2023

Crossrefs

Programs

  • Haskell
    a007918 n = a007918_list !! n
    a007918_list = 2 : 2 : 2 : concat (zipWith
                  (\p q -> (replicate (fromInteger(q - p)) q))
                                       a000040_list $ tail a000040_list)
    -- Reinhard Zumkeller, Jul 26 2012
    
  • Magma
    [2] cat [NextPrime(n-1): n in [1..80]]; // Vincenzo Librandi, Jan 14 2016
    
  • Maple
    A007918 := n-> nextprime(n-1); # M. F. Hasler, Apr 09 2008
  • Mathematica
    NextPrime[Range[-1, 72]] (* Jean-François Alcover, Apr 18 2011 *)
  • PARI
    A007918(n)=nextprime(n)  \\ M. F. Hasler, Jun 24 2011
    
  • PARI
    for(x=0,100,print1(nextprime(x)",")) \\ Cino Hilliard, Jan 15 2007
    
  • Python
    from sympy import nextprime
    def A007918(n): return nextprime(n-1) # Chai Wah Wu, Apr 22 2022

Formula

For n > 1: a(n) = A000040(A049084(A007917(n)) + 1 - A010051(n)). - Reinhard Zumkeller, Jul 26 2012
a(n) = A151800(n-1). - Seiichi Manyama, Apr 02 2018

A088430 a(n) = the least positive d such that for p=prime(n), the numbers p+0d, p+1d, p+2d, ..., p+(p-1)d are all primes.

Original entry on oeis.org

1, 2, 6, 150, 1536160080, 9918821194590, 341976204789992332560, 2166703103992332274919550
Offset: 1

Views

Author

Zak Seidov, Sep 30 2003

Keywords

Comments

Problem discussed by Russell E. Rierson: starting with given p, find the least d such that the arithmetic progression p,p+d,p+2d,... contains only primes. Obviously, the maximum number of prime terms is p and to reach that maximum, d must be a multiple of all smaller primes. For example, a(5) is a multiple of 2*3*5*7.
There can be other maximum-length prime progressions starting at p, with larger d. (Zak Seidov found d=4911773580 for p=11.)

Examples

			n AP Last term
--------------
1 2+i 3
2 3+2*i 7
3 5+6*i 29
4 7+150*i 907
5 11+1536160080*i 15361600811
6 13+9918821194590*i 119025854335093
7 17+341976204789992332560*i 5471619276639877320977
8 19+2166703103992332274919550*i 39000655871861980948551919
		

References

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

Crossrefs

See A113834 for last term in the progression, and A231017 for the 2nd term.

Programs

  • Mathematica
    A088430[n_] := Module[{p, m, d},
       p = Prime[n]; m = Product[Prime[i], {i, 1, n - 1}];
       d = m;
       While[! AllTrue[Table[p + i*d, {i, 1, p - 1}], PrimeQ], d = d + m];
       Return[d];
       ];
    Table[A088430[n], {n, 1, 8}] (* Robert Price, Mar 27 2019 *)

Formula

a(n) = A231017(n) - prime(n). - Jonathan Sondow, Nov 08 2013
a(n) = A061558(prime(n)). - Jens Kruse Andersen, Jun 30 2014
a(n) = A002110(n-1) * A231018(n). - Jeppe Stig Nielsen, Mar 16 2016

Extensions

Edited by Don Reble, Oct 04 2003
a(7) was found by Phil Carmody. - Don Reble, Nov 23 2003
Entry revised by N. J. A. Sloane, Jan 25 2006
a(8) found by Wojciech Izykowski. - Jens Kruse Andersen, Jun 30 2014

A133277 Triangle read by rows: row n gives the arithmetic progression of n primes with minimal final term, cf. A005115.

Original entry on oeis.org

2, 2, 3, 3, 5, 7, 5, 11, 17, 23, 5, 11, 17, 23, 29, 7, 37, 67, 97, 127, 157, 7, 157, 307, 457, 607, 757, 907, 199, 409, 619, 829, 1039, 1249, 1459, 1669, 199, 409, 619, 829, 1039, 1249, 1459, 1669, 1879, 199, 409, 619, 829, 1039, 1249, 1459, 1669, 1879, 2089, 110437, 124297, 138157, 152017, 165877, 179737, 193597, 207457, 221317, 235177, 249037
Offset: 1

Views

Author

N. J. A. Sloane, Oct 17 2007

Keywords

Comments

The first 10 rows (i.e., 55 terms) are the same as for A133276 (where the common distance is minimal), but here T(11,1) = a(56) = 110437 while A133276(11,1) = 60858179. - M. F. Hasler, Jan 02 2020
For any prime p there is a p-AP (arithmetic progression of p primes) starting with p, where the common distance is given by A088430. For n between prime(k-1) and prime(k), there may be an n-AP starting at prime(k) (but not earlier) with a smaller common distance, given in A061558. - M. F. Hasler, Sep 17 2024

Examples

			Triangle begins:
    2;
    2,   3;
    3,   5,   7;
    5,  11,  17,  23;
    5,  11,  17,  23,   29;
    7,  37,  67,  97,  127,  157;
    7, 157, 307, 457,  607,  757,  907;
  199, 409, 619, 829, 1039, 1249, 1459, 1669;
  199, 409, 619, 829, 1039, 1249, 1459, 1669, 1879;
  199, 409, 619, 829, 1039, 1249, 1459, 1669, 1879, 2089;
  ...
		

Crossrefs

For common differences, see A093364. For initial terms, see A113827. For final terms, see A005115.
Differs from A133276 (from T(11,1) = a(56) on).
See also A061558 (distance in earliest n-AP), A088430 (same for primes), A231017 (second term in p-AP starting with p), A061558 (distance of n-AP starting at the smallest possible prime).

Extensions

A-numbers in the Name and Crossrefs sections corrected by Bobby Jacobs, Dec 10 2016
Name edited by M. F. Hasler, Jan 02 2020

A130791 Triangle read by rows: n-th row is the lexicographically earliest arithmetic progression of n primes beginning with A007918(n).

Original entry on oeis.org

2, 2, 3, 3, 5, 7, 5, 11, 17, 23, 5, 11, 17, 23, 29, 7, 37, 67, 97, 127, 157, 7, 157, 307, 457, 607, 757, 907, 11, 1210241, 2420471, 3630701, 4840931, 6051161, 7261391, 8471621, 11, 32671181, 65342351, 98013521, 130684691, 163355861, 196027031, 228698201, 261369371
Offset: 1

Views

Author

N. J. A. Sloane, Sep 22 2007, Oct 17 2007

Keywords

Comments

If we omit the first row, is this the same triangle as A113460? Equivalently, do A061558 and A113461 agree apart from the initial term? Answer: almost certainly not!

Examples

			Triangle begins:
2
2 3
3 5 7
5 11 17 23
5 11 17 23 29
7 37 67 97 127 157
7 157 307 457 607 757 907
11 1210241 2420471 3630701 4840931 6051161 7261391 8471621
11 32671181 65342351 98013521 130684691 163355861 196027031 228698201 261369371
		

Crossrefs

For common differences see A061558.

Extensions

Extended by Ray Chandler, Sep 22 2007

A113461 Common differences of arithmetic progressions in A113460.

Original entry on oeis.org

0, 1, 2, 6, 6, 30, 150, 1210230, 32671170, 224494620, 1536160080, 1482708889200
Offset: 1

Views

Author

David Wasserman, Jan 08 2006

Keywords

Comments

Apart from the initial term, does this sequence coincide with A061558? Does A113460 coincide with A130791? - N. J. A. Sloane, Sep 22 2007
Apart from the initial term, this sequence coincides with A061558 for at least the first 210 terms. - David W. Wilson, Sep 22 2007

Crossrefs

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.
Showing 1-8 of 8 results.