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

A031172 a(n) = prime(n+10) - prime(n).

Original entry on oeis.org

29, 34, 36, 36, 36, 40, 42, 42, 44, 42, 42, 42, 42, 46, 50, 48, 44, 46, 42, 42, 54, 52, 54, 50, 52, 50, 54, 56, 58, 60, 52, 50, 54, 54, 48, 48, 54, 60, 60, 56, 54, 58, 50, 58, 60, 64, 58, 48, 50, 52, 50, 54, 66, 60, 56, 54, 62, 66, 70, 68, 70, 66, 60, 62, 66, 66, 58
Offset: 1

Views

Author

Keywords

Comments

In principle, moderate values should appear infinitely many times, by analogy with twin primes hypothesis. For example, a(n) = 44 for n = 9, 17, 206, 1604467, 12905293, 18008874, 26545460, 32655424, 57848470, 58313630, 59022635, 66275281, 81581956, 123780499, 160884754, 167797255, 179786560, 181569324, 239542290, ... - Zak Seidov, Sep 14 2014, edited by M. F. Hasler, Dec 03 2018
According to the k-tuple conjecture, any admissible k-tuple of primes occurs with calculable nonzero asymptotic density, i.e., in particular, infinitely many times. For k = 11, number of primes in the interval [prime(n), prime(n+10)], the smallest possible diameter of a k-tuple is A008407(11) = 36, and there are A083409(11) = 2 such constellations: {0, 4, 6, 10, 16, 18, 24, 28, 30, 34, 36}, first occurring at A213646(1) = 1418575498573, and {0, 2, 6, 8, 12, 18, 20, 26, 30, 32, 36}, first occurring at A213647(1) = 11. The combined list { prime(n) | a(n) = 36 } is A257129. - M. F. Hasler, Dec 03 2018

Crossrefs

Programs

  • GAP
    P:=Filtered([1..400],IsPrime);; a:=List([1..Length(P)-10],n->P[n+10]-P[n]); # Muniru A Asiru, Dec 06 2018
  • Haskell
    a031172_list = zipWith (-) (drop 10 a000040_list) a000040_list
    a031172 n = a031172_list !! (n-1)  -- Reinhard Zumkeller, Aug 23 2015
    
  • Magma
    [NthPrime(n+10)-NthPrime(n): n in [1..100] ]; // Vincenzo Librandi, Apr 23 2011
    
  • Maple
    A031172:=n->ithprime(n+10)-ithprime(n): seq(A031172(n), n=1..50);
  • Mathematica
    Table[Prime[n + 10] - Prime[n], {n, 50}] (* Wesley Ivan Hurt, Sep 14 2014 *)
  • PARI
    A031172(n)=prime(n+10)-prime(n) \\ M. F. Hasler, Dec 03 2018
    
  • Python
    from sympy import prime
    for n in range(1,100): print(prime(n+10)-prime(n)) # Stefano Spezia, Dec 06 2018
    
  • Sage
    [(nth_prime(n+10) - nth_prime(n)) for n in (1..100)] # G. C. Greubel, Dec 04 2018
    

Formula

a(n) = A000040(n+10) - A000040(n). - Wesley Ivan Hurt, Sep 14 2014

Extensions

Offset changed from 2 to 1; added a(1)=29 by Vincenzo Librandi, Apr 23 2011

A113404 Record gaps between prime quadruplets.

Original entry on oeis.org

6, 90, 630, 660, 1170, 2190, 3780, 6420, 8940, 9030, 13260, 16470, 24150, 28800, 29610, 39990, 56580, 56910, 71610, 83460, 94530, 114450, 157830, 159060, 171180, 177360, 190500, 197910, 268050, 315840, 395520, 435240, 440910, 513570, 536010, 539310, 557340, 635130
Offset: 1

Views

Author

Bernardo Boncompagni, Oct 28 2005

Keywords

Comments

Prime quadruplets (p, p+2, p+6, p+8) are densest permissible constellations of 4 primes (A007530). By the Hardy-Littlewood k-tuple conjecture, average gaps between prime k-tuples are O(log^k(p)), with k=4 for quadruplets. If a gap is larger than all preceding gaps, we call it a maximal gap, or a record gap. Maximal gaps may be significantly larger than average gaps. This sequence suggests that maximal gaps between prime quadruplets are O(log^5(p)). - Alexei Kourbatov, Jan 04 2012

Examples

			The first prime quadruplets are (5,7,11,13) and (11,13,17,19), so a(1)=11-5=6. The next quadruplet is (101,103,107,109), so a(2)=101-11=90. The following quadruplet is 191,193,197,199 so 90 remains the record and no terms are added.
		

Crossrefs

A229907 lists initial primes in quadruplets preceding the maximal gaps. A113403 lists the corresponding primes at the end of the maximal gaps. Cf. A008407, A007530.

Programs

  • Mathematica
    DeleteDuplicates[Differences[#[[4]]&/@Select[Partition[Prime[Range[10^7]],4,1],Differences[#] == {2,4,2}&]],GreaterEqual] (* The program generates the first 29 terms of the sequence. *) (* Harvey P. Dale, Aug 04 2024 *)

Formula

From Alexei Kourbatov, Jan 04 2012: (Start)
(1) Upper bound: gaps between prime quadruplets (p, p+2, p+6, p+8) are smaller than 0.241*(log p)^5, where p is the prime at the end of the gap.
(2) Estimate for the actual size of the maximal gap that ends at p: maximal gap = a*(log(p/a)-0.55), where a = 0.241*(log p)^4 is the average gap between quadruplets near p, as predicted by the Hardy-Littlewood k-tuple conjecture.
Formulas (1) and (2) are asymptotically equal as p tends to infinity. However, (1) yields values greater than all known gaps, while (2) yields "good guesses" that may be either above or below the actual size of known maximal gaps.
Both formulas (1) and (2) are derived from the Hardy-Littlewood k-tuple conjecture via probability-based heuristics relating the expected maximal gap size to the average gap. Neither of the formulas has a rigorous proof (the k-tuple conjecture itself has no formal proof either). In both formulas, the constant ~0.241 is reciprocal to the Hardy-Littlewood 4-tuple constant 4.15118... (End)

Extensions

Terms 159060 to 635130 added by Alexei Kourbatov, Jan 04 2012

A200503 Record (maximal) gaps between prime sextuplets (p, p+4, p+6, p+10, p+12, p+16).

Original entry on oeis.org

90, 15960, 24360, 1047480, 2605680, 2856000, 3605070, 4438560, 5268900, 17958150, 21955290, 23910600, 37284660, 40198200, 62438460, 64094520, 66134250, 70590030, 77649390, 83360970, 90070470, 93143820, 98228130, 117164040, 131312160, 151078830, 154904820
Offset: 1

Views

Author

Alexei Kourbatov, Nov 18 2011

Keywords

Comments

Prime sextuplets (p, p+4, p+6, p+10, p+12, p+16) are densest permissible constellations of 6 primes. Average gaps between sextuplets (and, more generally, between prime k-tuples) can be deduced from the Hardy-Littlewood k-tuple conjecture and are O(log^6(p)). Maximal gaps may be significantly larger than average gaps; this sequence suggests that maximal gaps are O(log^7(p)).
A200504 lists initial primes in sextuplets preceding the maximal gaps. A233426 lists the corresponding primes at the end of the maximal gaps.

Examples

			The gap of 15960 between sextuplets with initial primes 97 and 16057 is a maximal gap - larger than any preceding gap; therefore a(2)=15960.
		

Crossrefs

Programs

  • Mathematica
    DeleteDuplicates[Differences[Select[Partition[Prime[Range[10^7]],6,1],Differences[#]=={4,2,4,2,4}&][[;;,1]]],GreaterEqual] (* The program generates the first 10 terms of the sequence. *) (* Harvey P. Dale, May 08 2025 *)

Formula

(1) Conjectured upper bound: gaps between prime sextuplets (p, p+4, p+6, p+10, p+12, p+16) are smaller than 0.058*(log p)^7, where p is the prime at the end of the gap.
(2) Estimate for the actual size of the maximal gap that ends at p: maximal gap = a(log(p/a)-1/3), where a = 0.058*(log p)^6 is the average gap between sextuplets near p, as predicted by the Hardy-Littlewood k-tuple conjecture.
Formulas (1) and (2) are asymptotically equal as p tends to infinity. However, (1) yields values greater than all known gaps, while (2) yields "good guesses" that may be either above or below the actual size of maximal gaps. Both formulas (1) and (2) are derived from the Hardy-Littlewood k-tuple conjecture via probability-based heuristics relating the expected maximal gap size to the average gap. Neither of the formulas has a rigorous proof (the k-tuple conjecture itself has no formal proof either). In both formulas, the constant ~0.058 is reciprocal to the Hardy-Littlewood 6-tuple constant 17.2986...

A023193 a(n) gives the largest number k for which there is at least one admissible k-tuple taken from [0, 1, ..., n-1] if the tuple starts with 0. Admissibility is defined in a comment.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20
Offset: 1

Views

Author

Keywords

Comments

The (wrong) old name was: Largest number of pairwise coprime numbers that can occur in an interval of length n. - Wolfdieter Lang, Oct 10 2017
Conjecturally, a(n) is the largest number of primes that occurs on an infinite number of intervals of n consecutive integers. The conjecture is apparently due to Dickson; Hardy & Littlewood's Conjecture B concerns only pairs (p, p + 2n).
According to the link at www.opertech.com, a(3159) >= 447 > 446 = pi(3159). The k-tuples conjecture then implies that, for an infinitude of n, the interval [n+1, n+3159] includes 447 primes. For these n, pi(n+3159) >= pi(n)+447 > pi(n)+446 = pi(n)+pi(3159), contradicting the conjecture that pi(x+y) <= pi(x)+pi(y). - David W. Wilson, May 23 2005
From Wolfdieter Lang, Oct 10 2017: (Start)
The following admissibility definition is adapted from the Hensley and Richards [H-R] or Richards [R] links. A k-tuple B_k = [b_1, b_2, ..., b_k] of integers with 0 <= b_1 < b_2 < ... < b_k is admissible if, for each prime p, there exists at least one congruence class modulo p which contains none of the B_k members. Because complete residue systems modulo p are equivalent under translation one can consider the length n interval [0, 1, ..., n-1] and admissible k-tuples starting with 0. The prime p = 2 allows then only even tuple numbers from I_n = [0, 2, ..., floor((n-1)/2)]. Only primes p <= k have to be tested.
a(n) is then the maximal k for which there is at least one such admissible B_k tuple from the interval I_n. This function a(n) is called rho^* in (H-R) and (R). It has been given as rhobar in the Schinzel - Sierpiński link, Théorème 1, p. 201.
Note that there are also admissible k-tuples from members of [0, 1, ..., n-1] which do not start with 0. Such tuples are translations of the ones starting with 0. E.g., [1, 3] is an admissible 2-tuple for any [0, 1,..., n-1] interval with n >= 3, but it is a translation of the considered [0, 2] tuple.
For the multiplicities of k see A047947(k), for k >= 1.
For the smallest k such that a(k) = n see A020497(n), for k >= 1.
For the number of all admissible k-tuples from the interval I_n starting with 0 see the array A292224(n, k), with k = 1..a(n), which has been given in the Engelsma link, Table 2, p. 27.
One of the Hardy-Littlewood conjectures (the prime tuple conjecture, see also conjecture (B) given by [H-R] and [R], and Ribenboim, hypothesis (D_1), p. 373, from the Dickson conjecture) is that there are infinitely many primes with gaps defined by any admissible B_k tuple, that is, all p, p + b_2, ..., p + b_k are prime for infinitely many primes p, for k >= 2. For k = 1 this is well known.
(End)

References

  • Douglas Hensley and Ian Richards, "On the incompatibility of two conjectures concerning primes". Analytic number theory (Proc. Sympos. Pure Math., Vol. XXIV, St. Louis Univ., St. Louis, Mo., 1972), pp. 123-127.
  • P. Ribenboim, The New Book of Prime Number Records, Springer-Verlag, NY, 1996, ch. 6, I, pp. 372-386.

Crossrefs

Cf. A008407 (minimal difference of first and last prime in a prime k-tuplet), A047947 (multiplicities), A066081 (weaker binary conjectures), A062571.
Least inverse is A020497.

Formula

Conjecturally, a(n) = lim sup pi(x+n)-pi(x), where pi = A000720. This would follow from the k-tuple conjecture. - David W. Wilson, May 23 2005
a(n) = minimum m such that A008407(m) >= n. - Max Alekseyev, Nov 03 2008
Richards shows that a(n) > n/log n + kn/log^2 n + o(n/log^2 n), where k = 1 + log 2 = 1.69... . In particular, a(n) > pi(n) for large enough n. Hensley & Richards 1974 cite a result of Montgomery & Vaughan "to appear" that a(n) <= 2*pi(n) for n >= 2. - Charles R Greathouse IV, Apr 16 2013

Extensions

Name corrected by Wolfdieter Lang, Oct 10 2017

A065688 First prime in the smallest (nontrivial) prime k-tuplet.

Original entry on oeis.org

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

Views

Author

Frank Ellermann, Dec 04 2001

Keywords

Comments

For a proper definition see the cross-references.

Examples

			a(8): 11 13 17 19 23 29 31 37 are primes and 37-11=26=A008407(8).
		

Crossrefs

Cf. A008407 (minimal difference of first and last prime in a prime k-tuplet), A023193 (prime k-tuplet conjectures), A047947 (Schinzel's rhobar), A020497.
Cf. A261324 (another variant including trivial tuplets).

Extensions

a(1) prepended and a(20)-a(23) added by Max Alekseyev, Aug 15 2015

A266511 Minimal difference between the smallest and largest of n consecutive large primes that form a symmetric n-tuplet as permitted by divisibility considerations.

Original entry on oeis.org

0, 2, 12, 8, 36, 16, 60, 26, 84, 34, 132, 46, 168, 56, 180, 74, 240, 82, 252, 94, 324, 106, 372, 118, 420, 134, 432, 142, 492, 146, 540, 158, 600, 166, 648, 178, 660, 194, 720, 202, 780, 214, 816, 226, 840, 254, 912, 262, 1020, 278
Offset: 1

Views

Author

Max Alekseyev, Dec 30 2015

Keywords

Comments

For the definition of n-tuplet and minimal differences without the symmetry restriction, see A008407. In particular, a(n) >= A008407(n).
An n-tuplet (p(1),...,p(n)) is symmetric if p(k) + p(n+1-k) is the same for all k=1,2,...,n (cf. A175309).
Smallest primes starting a shortest symmetric n-tuplet are given in A266512.
For odd n, a(n) is divisible by 12.

Examples

			For n=3, any shortest symmetric n-tuplet has the form (p, p+6, p+12) and thus a(3)=12.
From _Jon E. Schoenfield_, Jan 05 2016: (Start)
For each n-tuplet (p(1), ..., p(n)) with odd n, let m be its middle prime, i.e., m = p((n+1)/2). Then, since (by symmetry) (p(k) + p(n+1-k))/2 = m for all k = 1..n, we can define the n-tuplet by m and its vector of differences d(j) = m - p(j) for j = 1..(n-1)/2. In other words, given m and d(j) for j = 1..(n-1)/2, the (n-1)/2 primes below m are given by p(j) = m - d(j), and the (n-1)/2 primes above m are given by p(n+1-j) = m + d(j); the difference p(n) - p(1) is thus (m + d(1)) - (m - d(1)) = 2*d(1).
For example, one symmetric 7-tuplet of consecutive primes is (12003179, 12003191, 12003197, 12003209, 12003221, 12003227, 12003239), which can be written as (m-30, m-18, m-12, m, m+12, m+18, m+30) where m=12003209; here we have d(1)=30, d(2)=18, d(3)=12. Among all symmetric 7-tuplets of consecutive primes that satisfy divisibility considerations, the minimal value of d(1) is, in fact, 30, so a(7) = 2*30 = 60.
For n = 3, 5, ..., 29, the lexicographically first vector (d(1), d(2), ..., d((n-1)/2)) permitted by divisibility considerations is as follows:
   n|  1   2   3   4   5   6   7   8   9  10  11  12  13  14
  --+-------------------------------------------------------
   3|  6
   5| 18  12
   7| 30  18  12
   9| 42  30  18  12
  11| 66  60  36  24   6
  13| 84  66  60  36  24   6
  15| 90  84  66  60  36  24   6
  17|120 108  90  78  60  48  42  18
  19|126 120 114  96  84  54  36  30   6
  21|162 150 132 120 108 102  78  48  42  18
  23|186 180 150 144 126  96  84  66  60  54  30
  25|210 186 180 150 144 126  96  84  66  60  54  30
  27|216 210 204 180 126 120 114  96  84  54  36  30   6
  29|246 216 210 204 186 174 144 126  90  84  66  60  24   6
(End)
		

Crossrefs

Extensions

a(1)-a(10) from Natalia Makarova
a(11)-a(14), a(16) from Dmitry Petukhov
a(15) and a(17)-a(18) from Jaroslaw Wroblewski
a(20) from Natalia Makarova and Jaroslaw Wroblewski
a(19), a(21), a(23), a(25), a(27), a(29) from Jon E. Schoenfield, Jan 02 2016, Jan 05 2016
a(22), a(24), a(26), a(28), a(30) from Natalia Makarova, Jul 06 2016
a(31)-a(50) from Vladimir Chirkov, Jul 08 2016

A332493 The minimal Skewes number for prime n-tuplets, choosing the n-tuplet with latest occurrence of the first sign change relative to the Hardy-Littlewood prediction when more than one type of n-tuplets exists (A083409(n)>1) for the given n.

Original entry on oeis.org

1369391, 87613571, 1172531, 216646267, 251331775687, 214159878489239, 750247439134737983
Offset: 2

Views

Author

Alexei Kourbatov and Hugo Pfoertner, May 11 2020

Keywords

Comments

a(n) >= A210439(n). Equals A210439(n) at n=2,4,6, i.e., at those n for which there is only one type of prime n-tuplets (admissible prime n-tuples of minimal span). The corresponding minimal span (diameter) is given by A008407(n).
See A210439 for more information, references and links.
From Hugo Pfoertner, Oct 21 2021: (Start)
There are two options for choosing a(8):
Either one interprets "latest occurrence" as the largest number of 8-tuplets before the Hardy-Littlewood (H-L) prediction is exceeded, or one selects the larger value of the first 8-tuplet term causing the first crossing.
In the first case, 40634356 8-tuplets of the type p + [0, 2, 6, 12, 14, 20, 24, 26] are required before the H-L prediction is exceeded with an 8-tuplet 523250002674163757 + [0, 2, 6, ...].
In the second case, 20316822 8-tuplets of type p + [0, 6, 8, 14, 18, 20, 24, 26] are needed to reach the first crossing of the H-L prediction. The corresponding 8-tuplet has 750247439134737983 as first term.
The interchanging is a consequence of the different H-L constants for the two tuplet types, 475.36521.. vs. 178.261954.., which have a ratio of 8/3 to one another.
Since the H-L constant for the "earliest occurrence" A210439(8) is 178.26.., this speaks in favor of a choice from the two possibilities, which uses the same H-L constant, i.e., the occurrence with the larger tuplet start and not the occurrence with the larger number of required tuplets, for which a separate sequence A348053 is created. (End)

Examples

			Denote by pi_n(x) the n-tuplet counting function, C_n the corresponding Hardy-Littlewood constant, and Li_n(x) the integral from 2 to x of (1/(log t)^n) dt.
For 7-tuples with pattern (0 2 8 12 14 18 20) we have the Skewes number p=214159878489239; this is the initial prime p in the 7-tuple where for the first time we have pi_7(p) > C_7 Li_7(p). For the other dense pattern (0 2 6 8 12 18 20), the first sign change of pi_7(x) - C_7 Li_7(x) occurs earlier, at 7572964186421. Therefore we have a(7)=214159878489239, while A210439(7)=7572964186421.
		

Crossrefs

Programs

  • PARI
    See A. Kourbatov link.
    
  • PARI
    \\ The first result is A210439(5), the 2nd is a(5)
    Li(x, n)=intnum(t=2, n, 1/log(t)^x);
    G5=(15^4/2^11)*0.409874885088236474478781212337955277896358; \\ A269843
    n1=0;n2=0;n1found=0;n2found=0;p1=5;p2=7;p3=11;p4=13;
    forprime(p5=17,10^12,if(p5-p1==12,my(L=Li(5,p1));if(p2-p1==2,n1++;if(!n1found&&n1/L>G5,print(p1," ",p2," ",n1," ",n1/L);n1found=1),n2++;if(!n2found&&n2/L>G5,print(p1," ",p2," ",n2," ",n2/L);n2found=1)));if(n1found&&n2found,break);p1=p2;p2=p3;p3=p4;p4=p5) \\ Hugo Pfoertner, May 12 2020
    \\ Code for a(7), similar to A. Kourbatov's code but much shorter.
    \\ Run time approx. 2 days, prints every 1000th 7-tuple
    G7=(35^6/(3*2^22))*0.36943751038649868932319074987675; \\ A271742
    s=[0,2,8,12,14,18,20];
    r=[809, 2069, 2909, 5639, 6689, 7529, 7739, 8999, 10259, 12149, 12359, 14459, 14879, 15929, 17189, 19289, 20549, 21389, 23909, 24119, 26009, 27479, 28529, 28739];
    forstep(p0=0,10^15,30030,for(j=1,24,my(p1=p0+r[j],isp=1,L);for(k=1,7,my(p=p1+s[k]);if(!ispseudoprime(p),isp=0;break));if(isp,L=Li(7,p1);n++;if(n%1000==0||n/L>G7,print(p1," ",p1+s[#s]," ",n/L," ",n));if(n/L>G7,break(2))))) \\ Hugo Pfoertner, May 16 2020

Extensions

a(8) from Norman Luhn and Hugo Pfoertner, Oct 21 2021

A135311 A greedy sequence of prime offsets.

Original entry on oeis.org

0, 2, 6, 8, 12, 18, 20, 26, 30, 32, 36, 42, 48, 50, 56, 62, 68, 72, 78, 86, 90, 96, 98, 102, 110, 116, 120, 128, 132, 138, 140, 146, 152, 156, 158, 162, 168, 176, 182, 186, 188, 198, 200, 210, 212, 216, 230, 240, 242, 246, 252, 260, 266, 270, 272, 278, 282
Offset: 1

Views

Author

galathaea(AT)gmail.com, Dec 07 2007

Keywords

Comments

Given a(i) for 1 <= i < n, a(n) is the smallest number > a(n-1) such that, for every prime p, the set {a(i) mod p : 1<=i<=n} has at most p-1 elements. Assuming Schinzel's hypothesis H, an equivalent statement is that a(n) is minimal such that there are infinitely many primes p with p+a(i) prime for 1 <= i <= n.
For every n, a(n) is not congruent to 1 (mod 2), nor to 1 (mod 3), nor to 4 (mod 5), nor to 3 (mod 7), ...
Note that this sequence does not always give the minimal difference between the first and last of n consecutive large primes, A008407. E.g., a(6)=18 but the 6 consecutive primes 97, 101, 103, 107, 109, 113 give the minimal difference of 16.

Examples

			Given a(1) through a(5), a(6) can't be 14 since the set {0,2,6,8,12,14} contains elements from every residue class (mod 5). a(6) can't be 16 because {0,2,6,8,12,16} contains elements from every residue class (mod 3). a(6)=18 is possible, since the residues (mod 2) are all 0, the residues (mod 3) are all 0 or 2 and the residues (mod 5) are all 0, 1, 2, or 3.
		

Crossrefs

Programs

  • Mathematica
    a[1]=0;a[n_]:=a[n]=Module[{v,set,ok,p},For[v=a[n-1]+2,True,v+=2,set=Append[a/@Range[n-1],v]; For[p=3;ok=True,p<=n,p+=2,If[PrimeQ[p]&&Length[Union[Mod[set,p]]]==p,ok=False;Break[]]];If[ok,Return[v]]]]
  • PARI
    {greedy()=local(A, L, B, n, v , ok , R, setR, p, k);
    A=vector(2089); \\ 2089 is the length to get Sum_{i>=2}(1/A[i])>2; see Ford, Luca, Moree paper, p. 1454
    L=length(A); B = 10^(5); \\ upper bound for the number of primes used; enough for the first 2089 terms
    A[1]=0;  \\ first trivial term;
    for (n=2, L,
    R=vector(n);
    forstep (v=A[n-1]+2, B, 2 , ok=1;
    forprime(p = 2, v,
    for(k=1,n-1, R[k]=A[k]%p);
    R[n]=v%p;
    setR=Set(R);
    if (length(setR) > p-1, ok=0; break);  \\ v is not good
    );
    if (ok==1, A[n]=v; break);
    );
    );
    return(A)
    } \\ Alessandro Languasco, Aug 11 2019

Extensions

Edited by Dean Hickerson, Dec 07 2007

A020498 a(n) is the least number > a(n-1) such that there is no prime p for which a(1) through a(n) would contain all residues modulo p.

Original entry on oeis.org

1, 3, 7, 9, 13, 19, 21, 27, 31, 33, 37, 43, 49, 51, 57, 63, 69, 73, 79, 87, 91, 97, 99, 103, 111, 117, 121, 129, 133, 139, 141, 147, 153, 157, 159, 163, 169, 177, 183, 187, 189, 199, 201, 211, 213, 217, 231, 241, 243, 247, 253, 261, 267, 271, 273, 279, 283, 289
Offset: 1

Views

Author

Keywords

Comments

Conjecturally, a(n) is the smallest number such that n primes occur infinitely often among (x+a(1), ...,x+a(n)).
From M. F. Hasler, Nov 25 2024: (Start)
For a given prime p, if r is the only residue (mod p) not among {a(1), ..., a(n)} (mod p) for some index n, then no term of the sequence can be congruent to r (mod p).
(Instead of a(1...n), one can consider any collection of terms.) - Examples:
(1) p = 2, r = 0, n = 1: No term can be congruent to 0 (mod 2), i.e., even.
(2) p = 3, r = 2, n = 2: No term may be congruent to 2 (mod 3).
(3) p = 5, r = 0, n = 4: No term may be a multiple of 5.
(4) p = 7, r = 4, n = 6: No term may be congruent to 4 (mod 7).
(5) p = 11, r = 6, n = 11: No term may be congruent to 6 (mod 11). (End)

Examples

			From _M. F. Hasler_, Nov 25 2024: (Start)
a(2) can't be 2 because otherwise for the prime p = 2, we would have {a(1), a(2)} == {0, 1} (mod p), a complete set of residues. (For the same reason, no other term can be even.) So a(2) = 3 is the smallest possible choice.
Similarly, a(3) must be odd but not congruent to 2 (mod 3) (*), otherwise {a(1), a(2), a(3)} would form a complete set of residues (mod 3). (* As before, this holds for all terms of the sequence.)
  So 5 is excluded and the smallest choice is a(3) = 7. (End)
		

References

  • R. K. Guy's "Unsolved Problems in Number Theory" (2nd edition, Springer, 1994), Section A9.

Crossrefs

Programs

  • PARI
    upto(N, a=[1])={for(n=2, N, forstep(k=a[n-1]+2, oo, 2, forprime(p=3, n, #Set(concat(a,k)%p)==p && next(2)); a=concat(a,k); break));a} \\ M. F. Hasler, Nov 25 2024

Extensions

More terms from David Wasserman, Aug 17 2005
Old name has been interchanged with Wasserman's comment, as old name only a conjectural definition of the sequence. Edited by Christopher J. Smyth, May 12 2016
Definition reworded by M. F. Hasler, Nov 25 2024

A186634 Irregular triangle, read by rows, giving dense patterns of n primes.

Original entry on oeis.org

0, 2, 0, 2, 6, 0, 4, 6, 0, 2, 6, 8, 0, 2, 6, 8, 12, 0, 4, 6, 10, 12, 0, 4, 6, 10, 12, 16, 0, 2, 6, 8, 12, 18, 20, 0, 2, 8, 12, 14, 18, 20, 0, 2, 6, 8, 12, 18, 20, 26, 0, 2, 6, 12, 14, 20, 24, 26, 0, 6, 8, 14, 18, 20, 24, 26, 0, 2, 6, 8, 12, 18, 20, 26, 30, 0, 2, 6, 12, 14, 20, 24, 26, 30, 0, 4, 6, 10, 16, 18, 24, 28, 30, 0, 4, 10, 12, 18, 22, 24, 28, 30, 0, 2, 6, 8, 12, 18, 20, 26, 30, 32, 0, 2, 6, 12, 14, 20, 24, 26, 30, 32
Offset: 2

Views

Author

T. D. Noe, Feb 24 2011

Keywords

Comments

The first pattern (0,2) is for twin primes (p,p+2). Row n contains A083409(n) patterns, each one consisting of 0 followed by n-1 terms. In each row the patterns are in lexicographic order.
These numbers (in a slightly different order) appear in Table 1 of the paper by Tony Forbes. Sequence A186702 gives the least prime starting a given pattern.

Examples

			The irregular triangle begins:
0, 2
0, 2, 6, 0, 4, 6
0, 2, 6, 8
0, 2, 6, 8, 12, 0, 4, 6, 10, 12
0, 4, 6, 10, 12, 16
0, 2, 6, 8, 12, 18, 20, 0, 2, 8, 12, 14, 18, 20
		

Crossrefs

Previous Showing 11-20 of 28 results. Next