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 10 results.

A089218 Erroneous version of A052195.

Original entry on oeis.org

69593, 110651, 228647, 250889, 318919, 396449, 421913, 498271, 507431, 554317
Offset: 1

Views

Author

Keywords

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

A122535 Smallest prime of a triple of successive primes, where the middle one is the arithmetic mean of the other two.

Original entry on oeis.org

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

Views

Author

Miklos Kristof, Sep 18 2006

Keywords

Comments

Subsets are A047948, A052188, A052189, A052190, A052195, A052197, A052198, etc. - R. J. Mathar, Apr 11 2008
Could be generated by searching for cases A001223(i) = A001223(i+1), writing down A000040(i). - R. J. Mathar, Dec 20 2008
a(n) = A006562(n) - A117217(n). - Zak Seidov, Feb 12 2013
These are primes for which the subsequent prime gaps are equal, so (p(k+2)-p(k+1))/(p(k+1)-p(k)) = 1. It is conjectured that prime gaps ratios equal to one are less frequent than those equal to 1/2, 2, 3/2, 2/3, 1/3 and 3. - Andres Cicuttin, Nov 07 2016

Examples

			The prime 7 is not in the list, because in the triple (7, 11, 13) of successive primes, 11 is not equal (7 + 13)/2 = 10.
The second term, 47, is the first prime in the triple (47, 53, 59) of primes, where 53 is the mean of 47 and 59.
		

Crossrefs

Programs

  • Haskell
    a122535 = a000040 . a064113  -- Reinhard Zumkeller, Jan 20 2012
    
  • Mathematica
    Clear[d2, d1, k]; d2[n_] = Prime[n + 2] - 2*Prime[n + 1] + Prime[n]; d1[n_] = Prime[n + 1] - Prime[n]; k[n_] = -d2[n]/(1 + d1[n])^(3/2); Flatten[Table[If[k[n] == 0, Prime[n], {}], {n, 1, 1000}]] (* Roger L. Bagula, Nov 13 2008 *)
    Transpose[Select[Partition[Prime[Range[750]], 3, 1], #[[2]] == (#[[1]] + #[[3]])/2 &]][[1]]  (* Harvey P. Dale, Jan 09 2011 *)
  • PARI
    A122535()={n=3;ctr=0;while(ctr<50, avgg=( prime(n-2)+prime(n) )/2;
    if( prime(n-1) ==avgg, ctr+=1;print( ctr,"  ",prime(n-2) )  );n+=1); } \\ Bill McEachen, Jan 19 2015

Formula

{A000040(i): A000040(i+1)= (A000040(i)+A000040(i+2))/2 }. - R. J. Mathar, Dec 20 2008
a(n) = A000040(A064113(n)). - Reinhard Zumkeller, Jan 20 2012

Extensions

More terms from Roger L. Bagula, Nov 13 2008
Definition rephrased by R. J. Mathar, Dec 20 2008

A052239 Smallest prime p in set of 4 consecutive primes in arithmetic progression with common difference 6n.

Original entry on oeis.org

251, 111497, 74453, 1397609, 642427, 5321191, 23921257, 55410683, 400948369, 253444777, 1140813701, 491525857, 998051413, 2060959049, 4480114337, 55140921491, 38415872947, 315392068463, 15162919459, 60600021611, 278300877401, 477836574947, 1486135570643
Offset: 1

Views

Author

Labos Elemer, Jan 31 2000

Keywords

Comments

See also the less restrictive A054701 where the gaps are multiples 6n. - M. F. Hasler, Nov 06 2018

Examples

			a(5) = 642427, 642457, 642487, 642517 are the smallest consecutive primes with 3 consecutive gaps of 30, cf. A052243.
From _M. F. Hasler_, Nov 06 2018: (Start)
Other terms are also initial terms of corresponding sequences:
a(1) = 251 = A033451(1) = A054800(1), start of first CPAP-4 with common gap of 6,
a(2) = 111497 = A033447(1), start of first CPAP-4 with common gap of 12,
a(3) = 74453 = A033448(1) = A054800(25), first CPAP-4 with common gap of 18,
a(4) = 1397609 = A052242(1), start of first CPAP-4 with common gap of 24,
a(5) = 642427 = A052243(1) = A052195(16), first CPAP-4 with common gap of 30,
a(6) = 5321191 = A058252(1) = A161534(26), first CPAP-4 with common gap 36 = 6^2,
a(7) = 23921257 = A058323(1), start of first CPAP-4 with common gap of 42,
a(8) = 55410683 = A067388(1), start of first CPAP-4 with common gap of 48,
a(9) = 400948369 = A259224(1), start of first CPAP-4 with common gap of 54,
a(10) = 253444777 = A210683(1) = A089234(417), CPAP-4 with common gap of 60,
a(11) = 1140813701 = A287547(1), start of first CPAP-4 with common gap of 66,
a(12) = 491525857 = A287550(1), start of first CPAP-4 with common gap of 72,
a(13) = 998051413 = A287171(1), start of first CPAP-4 with common gap of 78,
a(14) = 2060959049 = A287593(1), start of first CPAP-4 with common gap of 84,
a(15) = 4480114337 = A286817(1) = A204852(444), common distance 90. (End)
		

Crossrefs

Range is a subset of A054800: start of 4 consecutive primes in arithmetic progression (CPAP-4).
Cf. A054701: gaps are possibly distinct multiples of 6n (not CPAP's).

Programs

  • Mathematica
    Transpose[Flatten[Table[Select[Partition[Prime[Range[2000000]],4,1], Union[ Differences[ #]] =={6n}&,1],{n,7}],1]][[1]] (* Harvey P. Dale, Aug 12 2012 *)
  • PARI
    a(n, p=[2, 0, 0], d=6*[n, n, n])={while(p+d!=p=[nextprime(p[1]+1), p[1], p[2]], ); p[3]-d[3]} \\ after M. F. Hasler in A052243; Graziano Aglietti (mg5055(AT)mclink.it), Aug 22 2010, Corrected by M. F. Hasler, Nov 06 2018
    
  • PARI
    A052239(n, p=2, c, o)={n*=6; forprime(q=p+1, , if(p+n!=p=q, next, q!=o+2*n, c=2, c++>3, break); o=q-n); o-n} \\ M. F. Hasler, Nov 06 2018

Extensions

More terms from Labos Elemer, Jan 04 2002
a(7) corrected and more terms added by Graziano Aglietti (mg5055(AT)mclink.it), Aug 22 2010
a(15)-a(20) from Donovan Johnson, Oct 05 2010
a(21)-a(23) from Donovan Johnson, May 23 2011

A124596 Primes p such that q-p = 30, where q is the next prime after p.

Original entry on oeis.org

4297, 4831, 5351, 5749, 6491, 6917, 7253, 7759, 7963, 8389, 8893, 13063, 13187, 13933, 13967, 14251, 14983, 16381, 16573, 17627, 18553, 18869, 20563, 21283, 21347, 21617, 23633, 23689, 24251, 25189, 26053, 26597, 27299, 27367, 27551, 28319, 28979, 29537
Offset: 1

Views

Author

N. J. A. Sloane, Dec 19 2006

Keywords

Comments

These are the primes p = prime(k) where A001223(k) = 30. - N. J. A. Sloane, Dec 25 2019
Primes p such that r-q=q-p=30, where p, q, r are three successive primes, are A052195 = (69593, 110651, 134609, 228647, 237791, 250889, 303157, 24907,...). Primes p such that s-r=r-q=q-p=30, where p, q, r, s are four successive primes, are A052243 = (642427, 1058861, 3431903, 4176587, 4560121, 4721047, 5072269, 5145403, ...). - Zak Seidov, Dec 20 2006, edited by M. F. Hasler, Apr 04 2013

Crossrefs

See also A052187 and references therein.

Programs

  • Mathematica
    max = 30000;
    Reap[For[p = 2; q = 3, p < max, p = q, q = NextPrime[p]; If[q - p == 30, Sow[p]]]][[2, 1]] (* Jean-François Alcover, Sep 02 2018 *)
    Select[Partition[Prime[Range[5000]],2,1],#[[2]]-#[[1]]==30&][[All,1]] (* Harvey P. Dale, Dec 25 2019 *)

A052197 Primes p such that p, p+36, p+72 are consecutive primes.

Original entry on oeis.org

255767, 704321, 806821, 884501, 913067, 1065137, 1216177, 1448497, 1526191, 1532471, 1640971, 1918571, 2071087, 2275067, 2276431, 2336671, 2347591, 2376721, 2778547, 3098561, 3190601, 3248941, 3259001, 3452107, 3558481
Offset: 1

Views

Author

Labos Elemer, Jan 28 2000

Keywords

Comments

Old name was: Primes p(k) such that p(k+2)-p(k+1)=p(k+1)-p(k)=36.

Examples

			a(3) = 704321 is followed by 704357 and 704393, consecutive primes with equal distance of d = 36.
		

Crossrefs

Subsequence of A134117.

Programs

  • Mathematica
    Select[Partition[Prime[Range[255000]],3,1],Differences[#]=={36,36}&][[All,1]] (* Harvey P. Dale, Feb 16 2018 *)
  • PARI
    is(n)=nextprime(n+1)==n+36 && nextprime(n+37)==n+72 && isprime(n) \\ Charles R Greathouse IV, Jan 07 2013

Extensions

New name from Charles R Greathouse IV, Jan 07 2013

A052187 a(n) is the smallest prime p such that p, p+d, and p+2d are consecutive primes where d = 2 for n = 1 and d = 6*(n-1) for n > 1.

Original entry on oeis.org

3, 47, 199, 20183, 16763, 69593, 255767, 247099, 3565931, 6314393, 4911251, 12012677, 23346737, 43607351, 34346203, 36598517, 51041957, 460475467, 652576321, 742585183, 530324329, 807620651, 2988119207, 12447231761, 383204539, 4470607951, 5007182707
Offset: 1

Views

Author

Labos Elemer, Jan 28 2000

Keywords

Comments

The first term 3 is anomalous since for all others d is divisible by 6. These are minimal terms if in A047948 d=6 is replaced by possible differences: (2), 6, 12, 18, ..., 54, 60.
a(54) > 5*10^13, while a(55) = 46186474937633. - Giovanni Resta, Apr 08 2013

Examples

			a(2)=47 and it is the lower border of a dd pattern: 47[6 ]53[6 ]59. a(10)=6314393 and a(10)+54=6314447, a(10)+108=6314501 are consecutive primes and 6314393 is the smallest prime prior to a (54,54) difference pattern of A001223.
		

Crossrefs

Programs

  • Mathematica
    a = Table[0, {100}]; NextPrime[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; p = q = r = 0; Do[r = NextPrime[r]; If[r + p == 2q && r - q < 201 && a[[(r - q)/2]] == 0, a[[(r - q)/2]] = p]; p = q; q = r, {n, 1, 10^6}]; a (* Typos fixed by Zak Seidov, May 01 2020 *)
  • PARI
    list(n)=ve=vector(n);ppp=2;pp=3;forprime(p=5,,d=p-pp;if(pp-ppp==d,i=d\6+1;if(i<=n&&ve[i]==0,ve[i]=ppp;print1(".");vecprod(ve)>0&&return(ve)));ppp=pp;pp=p) \\ Jeppe Stig Nielsen, Apr 17 2022

Formula

The least prime(k) such that prime(k+1) = (prime(k) + prime(k+2))/2 and prime(k+1) - prime(k) = d is either 2 or divisible by 6.
a(1) = A054342(1) - 2. For n>1, a(n) = A054342(n) - 6*(n-1). - Jeppe Stig Nielsen, Apr 16 2022

Extensions

More terms from Labos Elemer, Jan 04 2002
More terms from Robert G. Wilson v, Jan 06 2002
Definition clarified by Harvey P. Dale, Aug 29 2012
a(23)-a(27) from Donovan Johnson, Aug 30 2012
Name edited by Jon E. Schoenfield, Nov 30 2023

A053075 Primes p such that p-30, p, p+30 are consecutive primes.

Original entry on oeis.org

69623, 110681, 134639, 228677, 237821, 250919, 303187, 318949, 396479, 421943, 498301, 507461, 535273, 554347, 629653, 642457, 642487, 668273, 692191, 716033, 729821, 780553, 782611, 790927, 801247, 825161, 829319, 847423, 892321, 902903
Offset: 1

Views

Author

Harvey P. Dale, Feb 25 2000

Keywords

Comments

Original name: Primes p(k) such that p(k) - p(k-1) = p(k+1) - p(k) = 30.

Examples

			110681 is separated from both the next lower prime and the next higher prime by 30
		

Crossrefs

Cf. A052195 (a(n)-30: first of the triplets) and cross-references there.
Subsequence of A124596 (primes followed by gap 30).

Programs

  • Mathematica
    lst={}; Do[p=Prime[n]; If[p-Prime[n-1] == Prime[n+1]-p == 6*5, AppendTo[lst,p]], {n,2,2*8!}]; lst (* Vladimir Joseph Stephan Orlovsky, May 20 2010 *)
  • PARI
    is_A053075(n)={precprime(n-1)==n-30&&nextprime(n+1)==n+30&&isprime(n)} \\ M. F. Hasler, Jan 02 2020

Formula

a(n) = A052195(n) + 30. - Zak Seidov, Dec 21 2012
A052195 = { A124596(n) | A124596(n-1) = A124596(n) - 30 }. - M. F. Hasler, Jan 02 2020

Extensions

Name edited to conform with style sheet and A052195 etc. - M. F. Hasler, Jan 02 2020

A224325 First of three consecutive primes in arithmetic progression with gap of 6n, and such that a(n) > a(n-1).

Original entry on oeis.org

47, 199, 20183, 40039, 69593, 255767, 689467, 3565931, 6314393, 9113263, 12012677, 23346737, 43607351, 69266033, 75138781, 324237847, 460475467, 652576321, 742585183, 747570079, 807620651, 2988119207, 12447231761
Offset: 1

Views

Author

M. F. Hasler, Apr 03 2013

Keywords

Comments

Without the condition on monotonicity, this would be essentially the same as A052187, but there 255767 is followed by 247099, while monotonicity here gives 689467. Similarly, following a(9) = A052187(10) = 6314393 we have a(10) = 9113263, while A052187(11) = 4911251. The next term which is not matching is a(14) = 69266033 vs A052187(15) = 34346203. One may notice that the two terms differ approximately by a factor of 2.

Examples

			a(1) = A047948(1) = 47 is the least prime p(k) such that p(k+1) - p(k) = p(k+2) - p(k+1) = 6.
a(2) = A052188(1) = 199 is the least prime p(k) > 47 such that p(k+1) - p(k) = p(k+2) - p(k+1) = 12.
a(3) = A052189(1) = 20183 is the least prime p(k) > 199 such that p(k+1) - p(k) = p(k+2) - p(k+1) = 18.
a(4) = A052190(1) = 40039 is the least prime p(k) > 20183 such that p(k+1) - p(k) = p(k+2) - p(k+1) = 24.
a(5) = A052195(1) = 69593 is the least prime p(k) > 40039 such that p(k+1) - p(k) = p(k+2) - p(k+1) = 30.
		

Crossrefs

Cf. A224324 (gaps of 30n).

Programs

  • PARI
    g=6;o=2;forprime(p=2,,o+g==(o=p)||next;nextprime(p+1)==p+g||next;print1(p-g",");g+=6)

A329578 First of three consecutive primes with common gap 48.

Original entry on oeis.org

3565931, 3653863, 3985903, 5425613, 5647361, 6126971, 6292081, 6532553, 7133983, 7360363, 7389493, 7700131, 7865833, 7956163, 8467903, 8708291, 8972701, 9203743, 9603361, 9863551, 10279813, 10971743, 11998391, 12225251, 12474251, 12620843, 12966881, 13288211, 13376261, 13543451
Offset: 1

Views

Author

M. F. Hasler, Jan 02 2020

Keywords

Crossrefs

Subsequence of A134123 (first of two primes with common gap 48).
A067388 (first of four primes with common gap 48) is a subsequence.
Cf. A047948, A052188, A052189, A052190, A052195, A052197, A052198, A089234 (analog for gaps 2, 4, 6, 12, 18, 24, ..., 60).

Programs

  • Magma
    [p:p in PrimesUpTo(14000000)| NextPrime(p)-p eq 48 and NextPrime(p+48)-p eq 96]; // Marius A. Burtea, Jan 03 2020
  • Mathematica
    Select[Partition[Prime[Range[900000]],3,1],Differences[#]=={48,48}&] [[All,1]] (* Harvey P. Dale, Aug 23 2021 *)
  • PARI
    vecextract( A134123, select(t->t==48, A134123[^1]-A134123[^-1], 1)) \\ Terms of A134123 with indices corresponding to first differences of 48: gives a(1..56) from A134123(1..10^4).
    
Showing 1-10 of 10 results.