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.

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