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

A007530 Prime quadruples: numbers k such that k, k+2, k+6, k+8 are all prime.

Original entry on oeis.org

5, 11, 101, 191, 821, 1481, 1871, 2081, 3251, 3461, 5651, 9431, 13001, 15641, 15731, 16061, 18041, 18911, 19421, 21011, 22271, 25301, 31721, 34841, 43781, 51341, 55331, 62981, 67211, 69491, 72221, 77261, 79691, 81041, 82721, 88811, 97841, 99131
Offset: 1

Views

Author

Keywords

Comments

Except for the first term, 5, all terms == 11 (mod 30). - Zak Seidov, Dec 04 2008
Some further values: For k = 1, ..., 10, a(k*10^3) = 11721791, 31210841, 54112601, 78984791, 106583831, 136466501, 165939791, 196512551, 230794301, 265201421. - M. F. Hasler, May 04 2009
k is the first prime of 2 consecutive twin prime pairs. - Daniel Forgues, Aug 01 2009
The prime quadruples of form p + (0, 2, 6, 8) have the quadruple congruence class (-1, +1, -1, +1) (mod 6). - Daniel Forgues, Aug 12 2009
s = (p+8)-(p) = 8 is the smallest s giving an admissible prime quadruple form, for which the only admissible form is p + (0, 2, 6, 8), since (0, 2, 6, 8) is the only form not covering all the congruence classes for any prime <= 4. Since s is smallest, these prime quadruples are prime constellations (or prime quadruplets), i.e., they contain consecutive primes. - Daniel Forgues, Aug 12 2009
Except for the first term, 5, all prime quadruples are of the form (15k-4, 15k-2, 15k+2, 15k+4), with k >= 1, and so are centered on 15k. - Daniel Forgues, Aug 12 2009
Subsequence of A022004. - R. J. Mathar, Feb 10 2013
The quadruplets are listed in A136162. - M. F. Hasler, Apr 20 2013
Starting at a(2) and examining the first 50 terms, (a(n)+4)/15 is a prime in 8 cases and a semiprime in 21; the last 18 terms have 2 primes and 11 semiprimes. Do the number of semiprimes continue to occur greater than mere chance? - J. M. Bergot, Apr 27 2015

Examples

			From _M. F. Hasler_, May 04 2009: (Start)
a(1)=5 is the start of the first prime quadruplet, {5,7,11,13}.
a(2)=11 is the start of the second prime quadruplet, {11,13,17,19}, and all other prime quadruplets differ from this one by a multiple of 30.
a(100)=470081 is the start of the 100th prime quadruplet;
a(500)=4370081 is the start of the 500th prime quadruplet.
a(167)=1002341 is the least quadruplet prime beyond 10^6. (End)
		

References

  • H. Rademacher, Lectures on Elementary Number Theory. Blaisdell, NY, 1964, p. 4.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A159910 (first differences divided by 30), A120120, A007811, A014561.

Programs

  • Magma
    [ p: p in PrimesUpTo(11000)| IsPrime(p+2) and IsPrime(p+6) and IsPrime(p+8)] // Vincenzo Librandi, Nov 18 2010
    
  • Mathematica
    A007530 = Select[Range[1, 10^5 - 1, 2], Union[PrimeQ[# + {0, 2, 6, 8}]] == {True} &] (* Alonso del Arte, Sep 24 2011 *)
    Select[Prime[Range[10000]],AllTrue[#+{2,6,8},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 11 2019 *)
  • PARI
    A007530( n, print_all=0, s=2 )={ my(p,q,r); until(!n--, until( p+8==s=nextprime(s+2), p=q; q=r; r=s); print_all && print1(p","));p} \\ The optional 3rd argument can be used to obtain large values by starting from some precomputed point instead of zero, using a(n+k) = A007530(k+1,,a(n)) (or A007530(k,,a(n)-1) for k>0); e.g., you get a(10^4+k) using A007530(k+1,,265201421) (value of a(10^4) from the comments section). - M. F. Hasler, May 04 2009
    
  • PARI
    forprime(p=2, 10^5, if(isprime(p+2) && isprime(p+6) && isprime(p+8), print1(p, ", "))) \\ Felix Fröhlich, Jun 22 2014
    
  • Python
    from sympy import primerange
    def aupto(limit):
      p, q, r, alst = 2, 3, 5, []
      for s in primerange(7, limit+9):
        if p+2 == q and p+6 == r and p+8 == s: alst.append(p)
        p, q, r = q, r, s
      return alst
    print(aupto(10**5)) # Michael S. Branicky, May 11 2021

Formula

a(n) = 11 + 30*A014561(n-1) for n > 1. - M. F. Hasler, May 04 2009

Extensions

More terms from Warut Roonguthai
Incorrect formula and Mathematica program removed by N. J. A. Sloane, Dec 04 2008, at the suggestion of Zak Seidov
Values up to a(1000) checked with the given PARI code by M. F. Hasler, May 04 2009

A007811 Numbers k for which 10k+1, 10k+3, 10k+7 and 10k+9 are primes.

Original entry on oeis.org

1, 10, 19, 82, 148, 187, 208, 325, 346, 565, 943, 1300, 1564, 1573, 1606, 1804, 1891, 1942, 2101, 2227, 2530, 3172, 3484, 4378, 5134, 5533, 6298, 6721, 6949, 7222, 7726, 7969, 8104, 8272, 8881, 9784, 9913, 10111, 10984, 11653, 11929, 12220, 13546, 14416, 15727
Offset: 1

Views

Author

N. J. A. Sloane and J. H. Conway, Mar 15 1996

Keywords

Crossrefs

Programs

  • Haskell
    a007811 n = a007811_list !! (n-1)
    a007811_list = map (pred . head) $ filter (all (== 1) . map a010051') $
       iterate (zipWith (+) [10, 10, 10, 10]) [1, 3, 7, 9]
    -- Reinhard Zumkeller, Jul 18 2014
    
  • Magma
    [n: n in [0..10000] | forall{10*n+r: r in [1,3,7,9] | IsPrime(10*n+r)}]; // Bruno Berselli, Sep 04 2012
    
  • Maple
    for n from 1 to 10000 do m := 10*n: if isprime(m+1) and isprime(m+3) and isprime(m+7) and isprime(m+9) then print(n); fi: od: quit
  • Mathematica
    Select[ Range[ 1, 10000, 3 ], PrimeQ[ 10*#+1 ] && PrimeQ[ 10*#+3 ] && PrimeQ[ 10*#+7 ] && PrimeQ[ 10*#+9 ]& ]
    Select[Range[15000], And @@ PrimeQ /@ ({1, 3, 7, 9} + 10#) &] (* Ray Chandler, Jan 12 2007 *)
  • PARI
    p=2;q=3;r=5;forprime(s=7,1e5,if(s-p==8 && r-p==6 && q-p==2 && p%10==1, print1(p", ")); p=q;q=r;r=s) \\ Charles R Greathouse IV, Mar 21 2013
    
  • Perl
    use ntheory ":all"; my @s = map { ($-1)/10 } sieve_prime_cluster(10,1e9, 2,6,8); say for @s; # _Dana Jacobsen, May 04 2017

Formula

a(n) = 3*A014561(n) + 1. - Zak Seidov, Sep 21 2009

A173037 Numbers k such that k-4, k-2, k+2 and k+4 are prime.

Original entry on oeis.org

9, 15, 105, 195, 825, 1485, 1875, 2085, 3255, 3465, 5655, 9435, 13005, 15645, 15735, 16065, 18045, 18915, 19425, 21015, 22275, 25305, 31725, 34845, 43785, 51345, 55335, 62985, 67215, 69495, 72225, 77265, 79695, 81045, 82725, 88815, 97845
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Feb 07 2010

Keywords

Comments

Average k of the four primes in two twin prime pairs (k-4, k-2) and (k+2, k+4) which are linked by the cousin prime pair (k-2, k+2).
All terms are odd composites; except for a(1) they are multiples of 5.
Subsequence of A087679, of A087680 and of A164385.
All terms except for a(1) are multiples of 15. - Zak Seidov, May 18 2014
One of (k-1, k, k+1) is always divisible by 7. - Fred Daniel Kline, Sep 24 2015
Terms other than a(1) must be equivalent to 1 mod 2, 0 mod 3, 0 mod 5, and 0,+/-1 mod 7. Taken together, this requires terms other than a(1) to have the form 210k+/-15 or 210k+105. However, not all numbers of that form belong to this sequence. - Keith Backman, Nov 09 2023

Examples

			9 is a term because 9-4 = 5 is prime, 9-2 = 7 is prime, 9+2 = 11 is prime and 9+4 = 13 is prime.
		

Crossrefs

Programs

  • Magma
    [ p+4: p in PrimesUpTo(100000) | IsPrime(p) and IsPrime(p+2) and IsPrime(p+6) and IsPrime(p+8) ]; // Klaus Brockhaus, Feb 09 2010
    
  • Mathematica
    Select[Range[100000],AllTrue[#+{4,2,-2,-4},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 30 2015 *)
  • PARI
    is(n)=isprime(n-4) && isprime(n-2) && isprime(n+2) && isprime(n+4) \\ Charles R Greathouse IV, Sep 24 2015
    
  • Python
    from sympy import primerange
    def aupto(limit):
        p, q, r, alst = 2, 3, 5, []
        for s in primerange(7, limit+5):
            if p+2 == q and p+6 == r and p+8 == s: alst.append(p+4)
            p, q, r = q, r, s
        return alst
    print(aupto(10**5)) # Michael S. Branicky, Feb 03 2022

Formula

For n >= 2, a(n) = 15*A112540(n-1). - Michel Marcus, May 19 2014
From Jeppe Stig Nielsen, Feb 18 2020: (Start)
For n >= 2, a(n) = 30*A014561(n-1) + 15.
For n >= 2, a(n) = 10*A007811(n-1) + 5.
a(n) = A007530(n) + 4.
a(n) = A125855(n) + 5. (End)

Extensions

Edited and extended beyond a(9) by Klaus Brockhaus, Feb 09 2010

A182279 Numbers n such that 30n+{11, 13, 17, 19, 23} are 5 consecutive primes.

Original entry on oeis.org

0, 3, 49, 535, 647, 700, 742, 1459, 1844, 4805, 5523, 5561, 6524, 6727, 7511, 8253, 8960, 10871, 11599, 12040, 13258, 15505, 17293, 17881, 21115, 21126, 22036, 25606, 26526, 27657, 28598, 29200, 31951, 33628, 34083, 35465, 35623, 36375, 39084, 39119, 40362
Offset: 1

Views

Author

Zak Seidov, Apr 23 2012

Keywords

Comments

All terms are congruent to {0, 3} mod 7.

Examples

			a(3) = 49 = A014561(5), a(4) = 535 = A014561(15).
		

Crossrefs

Subsequence of A014561.
Cf. A182282.

Programs

  • PARI
    isok(n) = isprime(p=30*n+11) && ((q=nextprime(p+1))==(30*n+13)) && ((r=nextprime(q+1))==(30*n+17)) && ((s=nextprime(r+1))==(30*n+19)) && ((t=nextprime(s+1))==(30*n+23)); \\ Michel Marcus, Oct 19 2013

A182282 Numbers n such that 210*n+{11, 13, 17, 19, 23, 29} are 6 consecutive primes.

Original entry on oeis.org

0, 7, 789, 1553, 3148, 4869, 5089, 5935, 6959, 9132, 14566, 19790, 20087, 26319, 39734, 48259, 56024, 56669, 62211, 74861, 75048, 88116, 89223, 91093, 91483, 95476, 100172, 113159, 122183, 130160, 152125, 160557, 163247, 164501, 167811, 176585, 187771, 189250
Offset: 1

Views

Author

Zak Seidov, Apr 23 2012

Keywords

Crossrefs

Programs

  • Maple
    a(3)=789=A182279(11)/7, a(4)=1553=A182279(18)/7.
  • Mathematica
    Select[Range[0,200000],AllTrue[210#+{11,13,17,19,23,29},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 28 2016 *)

A182387 Numbers k such that 210*k+{11,13,17,19,23,29,31} are 7 consecutive primes.

Original entry on oeis.org

0, 789, 5089, 56669, 75048, 88116, 100172, 122183, 187771, 214298, 322935, 413420, 445838, 593886, 648863, 667224, 736358, 772329, 868588, 888020, 890616, 907211, 945016, 1052954, 1078331, 1106177, 1146724, 1223888, 1432230, 1452437, 1458355, 1509878, 1535216
Offset: 1

Views

Author

Zak Seidov, Apr 27 2012

Keywords

Comments

Subsequence of A182282: a(2)=789=A182282(3), a(3)=5089=A182282(7), etc.

Crossrefs

Programs

  • Mathematica
    Select[Range[0,1600000],And@@PrimeQ[210 #+{11,13,17,19,23,29,31}]&] (* Harvey P. Dale, Mar 04 2013 *)

A061671 Numbers n such that { x +- 2^k : 0 < k < 4 } are primes, where x = 210*n - 105.

Original entry on oeis.org

1, 77, 93, 209, 5197, 7695, 9307, 13442, 13524, 15445, 16192, 28600, 30970, 34228, 36388, 38391, 41625, 50127, 52795, 55546, 69146, 70538, 70642, 70747, 76314, 76642, 90079, 91416, 93496, 94288, 95773, 96415, 101530, 104049, 107559, 118031
Offset: 1

Views

Author

Frank Ellermann, Jun 16 2001

Keywords

Comments

This sequence does not include the sextet (7,11,13,17,19,23). It is a proper subset of A014561 in a certain sense.

Examples

			16057, 16061, 16063, 16067, 16069, 16073 are prime and (16065+105)/210= 77= a(2).
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, conjectures following th. 5

Crossrefs

210 = 7*5*3*2 = A002110(4), cf. A014561.

Programs

  • Mathematica
    Select[Range[1, 1000000], Union[PrimeQ[(210*# - 105) + {-8, -4, -2, 2, 4, 8}]] == {True} &]
    Select[Range[120000],AllTrue[210#-105+{-8,-4,-2,2,4,8},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 05 2019 *)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jun 20 2001 and from Frank Ellermann, Nov 26 2001. Mathematica script from Peter Bertok (peter(AT)bertok.com), Nov 27 2001.

A066081 a(n) = smallest m such that m+2^j and m-2^j are prime for all 0 < j <= n.

Original entry on oeis.org

5, 9, 15, 50943795, 40874929095, 616517522595975, 93487500801880185, 64606701602327559675
Offset: 1

Views

Author

Frank Ellermann, Dec 03 2001

Keywords

Comments

Is this sequence infinite?

Examples

			9-4, 9-2, 9+2, 9+4 are prime, but not 5+4 = 7+2, therefore a(2) = 9.
		

Crossrefs

Prime quadruples: A014561, sextets: A061671, octets: A066082.

Extensions

a(5) and a(6) from Don Reble, Dec 07 2001
a(7) from Jim Fougeron (Feb 07) confirmed by Phil Carmody, who also found a(8) (Feb 14 2002).

A112540 Numbers m such that (15m-4, 15m-2, 15m+2, 15m+4) is a prime quadruple.

Original entry on oeis.org

1, 7, 13, 55, 99, 125, 139, 217, 231, 377, 629, 867, 1043, 1049, 1071, 1203, 1261, 1295, 1401, 1485, 1687, 2115, 2323, 2919, 3423, 3689, 4199, 4481, 4633, 4815, 5151, 5313, 5403, 5515, 5921, 6523, 6609, 6741, 7323, 7769, 7953, 8147, 9031, 9611, 10485, 11047
Offset: 1

Views

Author

Karsten Meyer, Dec 16 2005

Keywords

Comments

Also (4p + 16)/60 such that (p, p+2, p+6 and p+8) is a prime quadruple for p >= 11. - Michel Lagneau, Jul 02 2012
The density of these four-prime groups is approximately equal to (log x)^-3.45 (but not (log x)^-4). - Xueshi Gao, Jun 01 2014
All of the terms of this sequence are either 1, 7 or 13 modulo 14. - Rodolfo Ruiz-Huidobro, Dec 27 2019
From Eric Snyder, Jun 23 2021: (Start)
Building on the comment of R. Ruiz-Huidobro above, all terms of the sequence are congruent to one of {-1, 0 ,1} (mod 7). The appearance of mod 14 stems from the fact that all entries in this list must be odd. Equivalently, a(n) cannot be +- 2 or +- 3 (mod 7). This can be generalized for all larger primes:
All primes p >= 7 can be expressed as 15k +- q in a least absolute residue system, with q in {2, 4} if k is odd, and q in {1,7} if k is even.
For all primes 15k +- q >= 7, four residues +-r, +-s (mod p) exist such that, if for any p >= 7, [(m == +- r (mod p) or m == +- s (mod p)), and (m != k)], then m is not in this sequence. For the different values of p = 15k +- q, the values of +-r and +-s are as follows:
For p = 15k +- 1 (k even), r = +- 2k, s = +- 4k
For p = 15k +- 2 (k odd), r = +- k, s = +- 2k
For p = 15k + 4 (k odd), r = +- k, s = +- (7k + 2)
For p = 15k - 4 (k odd), r = +- k, s = +- (7k - 2)
For p = 15k + 7 (k even), r = +- (4k + 2), s = +- (8k + 4)
For p = 15k - 7 (k even), r = +- (4k - 2), s = +- (8k - 4)
These can be used to create an Eratosthenes-like sieve for the prime decades. (End)

Examples

			m = 7 yields the quadruple (15*7 - 4 = 101, 15*7 - 2 = 103, 15*7 + 2 = 107, 15*7 + 4 = 109), so 7 is a term of the sequence.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..2*10^4] | IsPrime(15*n-4) and IsPrime(15*n-2) and IsPrime(15*n+2) and IsPrime(15*n+4)]; // Vincenzo Librandi, Dec 28 2015
    
  • Maple
    A112540:=n->`if`(isprime(15*n-4) and isprime(15*n-2) and isprime(15*n+2) and isprime(15*n+4),n,NULL); seq(A112540(n), n=1..20000); # Wesley Ivan Hurt, Jul 26 2014
  • Mathematica
    Select[Range[6610], PrimeQ[15# - 4] && PrimeQ[15# - 2] && PrimeQ[15# + 2] && PrimeQ[15# + 4]&] (* T. D. Noe, Nov 16 2006 *)
  • PARI
    for(n=1, 1e4, if(isprime(15*n-4) && isprime(15*n-2) && isprime(15*n+2) && isprime(15*n+4), print1(n, ", "))) \\ Felix Fröhlich, Jul 26 2014
    
  • Perl
    use ntheory ":all"; say for map { (4*$+16)/60 } sieve_prime_cluster(11,15*10000, 2,6,8); # _Dana Jacobsen, Dec 15 2015
    
  • Python
    from sympy import isprime
    def ok(m): return all(isprime(15*m+k) for k in [-4, -2, 2, 4])
    print(list(filter(ok, range(11111)))) # Michael S. Branicky, Jun 24 2021

Extensions

Corrected by T. D. Noe, Nov 16 2006

A066082 Prime octets: numbers k such that 210*k - 105 +- 2^j are prime for all 1 <= j <= 4.

Original entry on oeis.org

242590, 1175444, 2416288, 2583146, 2596049, 2796151, 4953911, 5574794, 6127655, 6396209, 6460877, 6625438, 8521234, 11025856, 11352491, 15482298, 16228703, 18861024, 19048003, 20043534, 22835193, 31519781, 34399756
Offset: 1

Views

Author

Frank Ellermann, Dec 03 2001

Keywords

Examples

			a(1)=242590 because 210*a(1) - 105 = 50943795 and 50943795 -2, - 4, - 8, - 16, + 2, + 4, + 8 and + 16 are all prime.
		

Crossrefs

A proper subset of A061671 (prime sextets). Cf. prime quadruples A014561. See also A066081.

Programs

  • Mathematica
    With[{c=2^Range[4]},Select[Range[35*10^6],AllTrue[Flatten[210#-105+ {c,-c}], PrimeQ]&]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jun 10 2015 *)
  • PARI
    { n=0; for (m=1, 10^12, b=210*m - 105; c=0; for (j=1, 4, if (isprime(b - 2^j) , c++, break)); if (c<4, next); for (j=1, 4, if (isprime(b + 2^j) , c++, break)); if (c == 8, write("b066082.txt", n++, " ", m); if (n==100, return)) ) } \\ Harry J. Smith, Nov 11 2009

Extensions

More terms from Don Reble, Dec 07 2001
Showing 1-10 of 18 results. Next