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

A099734 Duplicate of A033451.

Original entry on oeis.org

251, 1741, 3301, 5101, 5381, 6311, 6361, 12641, 13451, 14741, 15791, 15901
Offset: 1

Views

Author

Keywords

A054800 First term of balanced prime quartets: p(m+1)-p(m) = p(m+2)-p(m+1) = p(m+3)-p(m+2).

Original entry on oeis.org

251, 1741, 3301, 5101, 5381, 6311, 6361, 12641, 13451, 14741, 15791, 15901, 17471, 18211, 19471, 23321, 26171, 30091, 30631, 53611, 56081, 62201, 63691, 71341, 74453, 75521, 76543, 77551, 78791, 80911, 82781, 83431, 84431, 89101, 89381
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Comments

This sequence is infinite if Dickson's conjecture holds. - Charles R Greathouse IV, Apr 23 2011
This is actually the complete list of primes starting a CPAP-4 (set of 4 consecutive primes in arithmetic progression). It equals A033451 for a(1..24), but it contains a(25) = 74453 which starts a CPAP-4 with common difference 18 (the first one with a difference > 6) and therefore is not in A033451. - M. F. Hasler, Oct 26 2018

Examples

			a(1) = 251 = prime(54) = A000040(54) and prime(55) - prime(54) = prime(56)-prime(55) = 6. - _Zak Seidov_, Apr 23 2011
		

Crossrefs

Cf. A006560 (first prime to start a CPAP-n).
Start of CPAP-4 with given common difference (in square brackets): A033451 [6], A033447 [12], A033448 [18], A052242 [24], A052243 [30], A058252 [36], A058323 [42], A067388 [48], A259224 [54], A210683 [60].

Programs

  • Mathematica
    Select[Partition[Prime[Range[9000]],4,1],Length[Union[Differences[#]]] == 1&][[All,1]] (* Harvey P. Dale, Aug 08 2017 *)
  • PARI
    p=2;q=3;r=5;forprime(s=7,1e4, t=s-r; if(t==r-q&&t==q-p, print1(p", ")); p=q;q=r;r=s) \\ Charles R Greathouse IV, Feb 14 2013

A006560 Smallest starting prime for n consecutive primes in arithmetic progression.

Original entry on oeis.org

2, 2, 3, 251, 9843019, 121174811
Offset: 1

Views

Author

Keywords

Comments

The primes following a(5) and a(6) occur at a(n)+30*k, k=0..(n-1). a(6) was found by Lander and Parkin. The next term requires a spacing >= 210. The expected size is a(7) > 10^21 (see link). - Hugo Pfoertner, Jun 25 2004
From Daniel Forgues, Jan 17 2011: (Start)
It is conjectured that there are arithmetic progressions of n consecutive primes for any n.
Common differences of first and smallest AP of n >= 1 consecutive primes: {0, 1, 2, 6, 30, 30, >= 210, >= 210, >= 210, >= 210, >= 2310, ...} (End)
a(7) <= 71137654873189893604531, found by P. Zimmermann, cf. J. K. Andersen link. - Bert Dobbelaere, Jul 27 2022

Examples

			First and smallest occurrence of n, n >= 1, consecutive primes in arithmetic progression:
a(1) = 2: (2) (degenerate arithmetic progression);
a(2) = 2: (2, 3) (degenerate arithmetic progression);
a(3) = 3: (3, 5, 7);
a(4) = 251: (251, 257, 263, 269);
a(5) = 9843019: (9843019, 9843049, 9843079, 9843109, 9843139);
a(6) = 121174811: (121174811, 121174841, 121174871, 121174901, 121174931, 121174961);
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(5) corresponds to A052243(20) followed by A052243(21) 9843049.
Cf. A089180: indices primes a(n).
Cf. A054800: start of 4 consecutive primes in arithmetic progression (CPAP-4), A033451: start of CPAP-4 with common difference 6, A052239: start of first CPAP-4 with common difference 6n.
Cf. A059044: start of 5 consecutive primes in arithmetic progression, A210727: CPAP-5 with common difference 60.
Cf. A058362: start of 6 consecutive primes in arithmetic progression.

Programs

  • Mathematica
    Join[{2},Table[SelectFirst[Partition[Prime[Range[691*10^4]],n,1], Length[ Union[ Differences[ #]]] == 1&][[1]],{n,2,6}]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 10 2019 *)

Formula

a(n) = A000040(A089180(n)), or A089180(n) = A000720(a(n)). - M. F. Hasler, Oct 27 2018

Extensions

Edited by Daniel Forgues, Jan 17 2011

A078847 Initial term in sequence of four consecutive primes separated by 3 consecutive differences each <= 6 (i.e., when d = 2, 4 or 6) and forming pattern = [2, 4, 6]; short notation = [246] d-pattern.

Original entry on oeis.org

17, 41, 227, 347, 641, 1091, 1277, 1427, 1487, 1607, 2687, 3527, 3917, 4001, 4127, 4637, 4787, 4931, 8231, 9461, 10331, 11777, 12107, 13901, 14627, 20747, 21557, 23741, 25577, 26681, 26711, 27737, 27941, 28277, 29021, 31247, 32057, 32297
Offset: 1

Views

Author

Labos Elemer, Dec 11 2002

Keywords

Comments

Subsequence of A022004. - R. J. Mathar, Feb 10 2013
a(n) + 12 is the greatest term in the sequence of 4 consecutive primes with 3 consecutive gaps 2, 4, 6. - Muniru A Asiru, Aug 03 2017

Examples

			17, 17+2 = 19, 17+2+4 = 23, 17+2+4+6 = 29 are consecutive primes.
		

Crossrefs

Cf. analogous prime quadruple sequences with various possible {2, 4, 6}-difference-patterns in brackets: A007530[242], A078847[246], A078848[264], A078849[266], A052378[424], A078850[426], A078851[462], A078852[466], A078853[624], A078854[626], A078855[642], A078856[646], A078857[662], A078858[664], A033451[666].
Cf. A190814[2,4,6,8], A190817[2,4,6,8,10], A190819[2,4,6,8,10,12], A190838[2,4,6,8,10,12,14]

Programs

  • Mathematica
    d = Differences[Prime[Range[10000]]]; Prime[Flatten[Position[Partition[d, 3, 1], {2, 4, 6}]]] (* T. D. Noe, May 23 2011 *)
    Transpose[Select[Partition[Prime[Range[10000]],4,1],Differences[#] == {2,4,6}&]][[1]] (* Harvey P. Dale, Aug 07 2013 *)

Formula

Primes p=prime(i) such that prime(i+1) = p+2, prime(i+2) = p+2+4, prime(i+3) = p+2+4+6.

Extensions

Listed terms verified by Ray Chandler, Apr 20 2009
Additional cross references from Harvey P. Dale, May 10 2014

A047948 Smallest of three consecutive primes with a difference of 6: primes p such that p+6 and p+12 are the next two primes.

Original entry on oeis.org

47, 151, 167, 251, 257, 367, 557, 587, 601, 647, 727, 941, 971, 1097, 1117, 1181, 1217, 1361, 1741, 1747, 1901, 2281, 2411, 2671, 2897, 2957, 3301, 3307, 3631, 3727, 4007, 4451, 4591, 4651, 4987, 5101, 5107, 5297, 5381, 5387, 5557, 5801, 6067, 6257, 6311, 6317
Offset: 1

Views

Author

Keywords

Comments

Let p(k) be the k-th prime; sequence gives p(k) such that p(k+2) - p(k+1) = p(k+1) - p(k) = 6.

Examples

			47 is a term as the next two primes are 53 and 59.
		

Crossrefs

Subsequence of A031924.
A033451 (four consecutive primes with difference 6) is a subsequence.

Programs

  • Mathematica
    ok[p_] := (q = NextPrime[p]) == p+6 && NextPrime[q] == q+6; Select[Prime /@ Range[1000], ok][[;; 45]] (* Jean-François Alcover, Jul 11 2011 *)
    Transpose[Select[Partition[Prime[Range[1000]],3,1],Differences[#]=={6,6}&]] [[1]] (* Harvey P. Dale, Apr 25 2014 *)
  • PARI
    is_A047948(n)={nextprime(n+1)==n+6 && nextprime(n+7)==n+12 && isprime(n)} \\ Charles R Greathouse IV, Aug 17 2011, simplified by M. F. Hasler, Jan 13 2013
    
  • PARI
    p=2;q=3;forprime(r=5,1e4,if(r-p==12&&q-p==6,print1(p", "));p=q;q=r) \\ Charles R Greathouse IV, Aug 17 2011

Extensions

Corrected by T. D. Noe, Mar 07 2008

A033447 Initial prime in set of 4 consecutive primes with common difference 12.

Original entry on oeis.org

111497, 258527, 286777, 318407, 332767, 341827, 358447, 439787, 473887, 480737, 495377, 634187, 647417, 658367, 663857, 703837, 732497, 816317, 819787, 827767, 843067, 862307, 937777, 970457, 970537, 1001267, 1012147, 1032727, 1052707, 1055827, 1104307, 1117877, 1164817, 1165837
Offset: 1

Views

Author

Keywords

Comments

From Zak Seidov, Sep 30 2014: (Start)
All terms are == {7, 17} mod 30. There is no set of 5 consecutive primes in arithmetic progression with common difference 12 (because a(n)+48 is always divisible by 5).
Minimal first difference a(n+1)-a(n) = 40, and this occurs first at a(709) = 26930767, a(11357) = 655389367 and a(23339) = 1510368877; all a(n) are == 7 mod 30. (End)

Crossrefs

Analogous sequences (start of CPAP-4 with common difference in square brackets): A033451 [6], this sequence [12], A033448 [18], A052242 [24], A052243 [30], A058252 [36], A058323 [42], A067388 [48], A259224 [54], A210683 [60].
Subsequence of A052188 and of A248085. - Zak Seidov, Jun 27 2015
Also subsequence of A054800: start of a CPAP-4, any common difference.

Programs

  • Mathematica
    A033447 = Reap[For[p = 2, p < 1100000, p = NextPrime[p], p2 = NextPrime[p]; If[p2 - p == 12, p3 = NextPrime[p2]; If[p3 - p2 == 12, p4 = NextPrime[p3]; If[p4 - p3 == 12, Sow[p]]]]]][[2, 1]] (* Jean-François Alcover, Jun 28 2012 *)
    Transpose[Select[Partition[Prime[Range[160000]],4,1],Union[ Differences[#]] =={12}&]][[1]] (* Harvey P. Dale, Jun 17 2014 *)
  • PARI
    A033447(n, p=2, show_all=1, g=12,c,o)={forprime(q=p+1,, if(p+g!=p=q, next, q!=o+2*g, c=2, c++>3, show_all&& print1(o-g", "); n--||break); o=q-g); o-g} \\ Can be used as next(p)=A033447(1, p+1) to get the next term, e.g.:
    p=0; A033447_vec=vector(30,i,p=A033447(1,p+1)) \\ M. F. Hasler, Oct 26 2018

Extensions

More terms from Labos Elemer, Jan 31 2000
Definition clarified by Harvey P. Dale, Jun 17 2014

A052243 Initial prime in set of (at least) 4 consecutive primes in arithmetic progression with difference 30.

Original entry on oeis.org

642427, 1058861, 3431903, 4176587, 4560121, 4721047, 5072269, 5145403, 5669099, 5893141, 6248969, 6285047, 6503179, 6682969, 8545357, 8776121, 8778739, 9490571, 9836227, 9843019, 9843049, 10023787, 11697979, 12057919, 12340313, 12687119, 12794641, 12845849
Offset: 1

Views

Author

Labos Elemer, Jan 31 2000

Keywords

Comments

Primes p such that p, p+30, p+60, p+90 are consecutive primes.
The analogous sequence for a CPAP-5 (at least five consecutive primes in arithmetic progression) with gap 30 does not have its own entry in the OEIS, but for over 500 terms it is identical to A059044. The CPAP-6 analog is A058362. - M. F. Hasler, Jan 02 2020

Examples

			642427, 642457, 642487, 642517 are consecutive primes, so 642427 is in the sequence.
		

Crossrefs

Analogous sequences (start of CPAP-4 with common difference in square brackets): A033451 [6], A033447 [12], A033448 [18], A052242 [24], A052243 [this: 30], A058252 [36], A058323 [42], A067388 [48], A259224 [54], A210683 [60].
Subsequence of A052195 and of A054800 (start of CPAP-4 with any common difference).
See also A059044 (start of CPAP-5), A058362 (CPAP-6).

Programs

  • Magma
    f:=func; a:=[]; for p in PrimesInInterval(2,13000000) do if  (f(p)-p eq 30) and (f(f(p))-p eq 60) and (f(f(f(p)))-p eq 90) then Append(~a,p); end if; end for; a; // Marius A. Burtea, Jan 04 2020
  • Maple
    p := 2 : q := 3 : r := 5 : s := 7 : for i from 1 do if q-p = 30 and r-q=30 and s-r=30 then printf("%d,\n",p) ; fi ; p := q ; q := r ; r := s ; s := nextprime(r) ; od: # R. J. Mathar, Apr 12 2008
  • Mathematica
    p=2; q=3; r=5; s=7; A052243 = Reap[For[i=1, i<1000000, i++, If[ q-p == 30 && r-q == 30 && s-r == 30 , Print[p]; Sow[p]]; p=q; q=r; r=s; s=NextPrime[r]]][[2, 1]] (* Jean-François Alcover, Jun 28 2012, after R. J. Mathar *)
    Transpose[Select[Partition[Prime[Range[1100000]],4,1],Union[ Differences[#]] =={30}&]][[1]] (* Harvey P. Dale, Jun 17 2014 *)
  • PARI
    A052243(n,p=2,print_all=0,g=30,c,o)={forprime(q=p+1,,if(p+g!=p=q, next, q!=o+2*g, c=2, c++>3, print_all&& print1(o-g","); n--||break); o=q-g);o-g} \\ optional 2nd arg specifies starting point, allows to define:
    next_A052243(p)=A052243(1,p+1) \\ replacing older code from 2008. - M. F. Hasler, Oct 26 2018
    

Formula

A052243 = { A052195(n) | A052195(n+1) = A052195(n) + 30 }. - M. F. Hasler, Jan 02 2020

Extensions

More terms from Harvey P. Dale, Nov 19 2000
Edited by N. J. A. Sloane, Apr 28 2008, at the suggestion of R. J. Mathar

A090832 Numbers k such that p(k), p(k)+6, p(k)+12, p(k)+18 are consecutive primes, where p(k) denotes k-th prime.

Original entry on oeis.org

54, 271, 464, 682, 709, 821, 829, 1510, 1594, 1726, 1842, 1853, 2009, 2086, 2209, 2600, 2876, 3253, 3303, 5463, 5689, 6252, 6386, 7064, 7438, 7620, 7728, 7918, 8090, 8145, 8229, 8631, 8654, 8828, 9105, 9184, 9243, 9997, 10052, 10074, 10329, 10934, 11257, 11343
Offset: 1

Views

Author

Pierre CAMI, Dec 09 2003

Keywords

Examples

			p(271)=1741: 1741,1747,1753,1759 are consecutive primes,1747=1741+6,1753=1741+12,1759=1741+18
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=Prime[n];Select[Range[15000],p[ #+1]-p[ # ]==p[ #+2]-p[ #+1]==p[ #+3]-p[ #+2]==6&] (* Zak Seidov, Mar 05 2006 *)
    PrimePi[#[[1]]]&/@Select[Partition[Prime[Range[11000]],4,1],Differences[#]=={6,6,6}&] (* Harvey P. Dale, Oct 28 2023 *)

Extensions

Corrected and extended by Zak Seidov, Mar 05 2006

A033448 Initial prime in set of 4 consecutive primes in arithmetic progression with common difference 18.

Original entry on oeis.org

74453, 76543, 132893, 182243, 202823, 297403, 358793, 485923, 655453, 735883, 759113, 780613, 797833, 849143, 1260383, 1306033, 1442173, 1531093, 1534153, 1586953, 1691033, 1717063, 1877243, 1945763, 1973633, 2035513, 2067083, 2216803, 2266993, 2542513, 2556803, 2565203, 2805773
Offset: 1

Views

Author

Keywords

Comments

Up to n = 10^4, the smallest difference a(n+1) - a(n) is 60 and occurs at n = 8571. - M. F. Hasler, Oct 26 2018
Each term is congruent to 3 mod 10 (as noted by Zak Seidov in the SeqFan email list). This means the three following consecutive primes are always congruent to 1, 9, and 7 mod 10, respectively (i.e., final digits for these primes are 3, 1, 9, 7, in that order). There cannot be a set of 5 such consecutive primes because a(n) + 4*18 == 5 (mod 10) so is a multiple of 5. - Rick L. Shepherd, Mar 27 2023

Examples

			{74453, 74471, 74489, 74507} is the first such set of 4 consecutive primes with common difference 18, so a(1) = 74453.
		

Crossrefs

Analogous sequences (start of CPAP-4 with common difference in square brackets): A033451 [6], A033447 [12], A033448 [this: 18], A052242 [24], A052243 [30], A058252 [36], A058323 [42], A067388 [48], A259224 [54], A210683 [60].

Programs

  • Mathematica
    A033448 = Reap[For[p = 2, p < 2100000, p = NextPrime[p], p2 = NextPrime[p]; If[p2 - p == 18, p3 = NextPrime[p2]; If[p3 - p2 == 18, p4 = NextPrime[p3]; If[p4 - p3 == 18, Sow[p]]]]]][[2, 1]] (* Jean-François Alcover, Jun 28 2012 *)
    Transpose[Select[Partition[Prime[Range[160000]],4,1],Union[ Differences[ #]] == {18}&]][[1]] (* Harvey P. Dale, Jun 17 2014 *)
  • PARI
    A033448(n,show_all=1,g=18,p=2,o,c)={forprime(q=p+1,,if(p+g!=p=q,next, q!=o+2*g, c=3, c++>4, print1(o-g","); n--||break); o=q-g);o-g} \\ Can be used as nxt(p)=A033448(1,,,p+1), e.g.: {p=0;vector(20,i,p=nxt(p))} or {p=0;for(i=1,1e4,write("b.txt",i" "nxt(p)))}. - M. F. Hasler, Oct 26 2018

Extensions

More terms from Labos Elemer, Jan 31 2000
Definition clarified by Harvey P. Dale, Jun 17 2014
Example reflecting final digits given by Rick L. Shepherd, Mar 27 2023

A078857 Initial term in sequence of four consecutive primes separated by 3 consecutive differences each <=6 (i.e., when d=2,4 or 6) and forming d-pattern=[6, 6,2]; short d-string notation of pattern = [662].

Original entry on oeis.org

47, 167, 257, 557, 587, 647, 1217, 2957, 4007, 6257, 6857, 7577, 10847, 11927, 14537, 16217, 17477, 19457, 24407, 25457, 26687, 26717, 29867, 41507, 41597, 48527, 51407, 54617, 56087, 60077, 61547, 68477, 75527, 82457, 84047, 94427, 101267
Offset: 1

Views

Author

Labos Elemer, Dec 11 2002

Keywords

Comments

Subsequence of A047948. - R. J. Mathar, Feb 11 2013

Examples

			p=47,47+6=53,47+6+6=59,47+6+6+2=61 are consecutive primes.
		

Crossrefs

Cf. analogous prime quadruple sequences with various possible {2, 4, 6}-difference-patterns in brackets: A007530[242], A078847[246], A078848[264], A078849[266], A052378[424], A078850[426], A078851[462], A078852[466], A078853[624], A078854[626], A078855[642], A078856[646], A078857[662], A078858[664], A033451[666].

Programs

  • Mathematica
    Select[Partition[Prime[Range[10000]],4,1],Differences[#]=={6,6,2}&][[All,1]] (* Harvey P. Dale, Apr 29 2017 *)

Formula

Primes p = p(i) such that p(i+1)=p+6, p(i+2)=p+6+6, p(i+3)=p+6+6+2.

Extensions

Listed terms verified by Ray Chandler, Apr 20 2009
Showing 1-10 of 52 results. Next