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-9 of 9 results.

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

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

A052195 Primes p such that p, p+30, p+60 are consecutive primes.

Original entry on oeis.org

69593, 110651, 134609, 228647, 237791, 250889, 303157, 318919, 396449, 421913, 498271, 507431, 535243, 554317, 629623, 642427, 642457, 668243, 692161, 716003, 729791, 780523, 782581, 790897, 801217, 825131, 829289, 847393, 892291, 902873, 940097, 942449, 963913, 995243, 1027067
Offset: 1

Views

Author

Labos Elemer, Jan 28 2000

Keywords

Examples

			69593, 69623, 69653 are consecutive primes with equal distance d = 30.
110651, 110681 and 110711 are consecutive primes with equal distance d = 30.
		

Crossrefs

Subsequence of A124596 (primes followed by gap 30).
Cf. A047948 (analog for gap 6), A052188 (gap 12), A052189 (gap 18), A052190 (gap 24), A053075 (a(n) + 30).
Cf. A001223 (gaps), A052243 (quadruplets with gap 30), A033451 (quadruplets with gap 6).

Programs

  • Mathematica
    Select[Partition[Prime[Range[80000]],3,1],Differences[#]=={30,30}&][[All,1]] (* Harvey P. Dale, May 03 2018 *)
  • PARI
    vecextract(A124596, select(t->t==30, A124596[^1]-A124596[^-1],1)) \\ Terms of A124596 with indices of first differences of 30. Gives a(1..230) from A124596(1..10^4). - M. F. Hasler, Jan 02 2020

Formula

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

A052190 Primes p such that p, p+24, p+48 are consecutive primes.

Original entry on oeis.org

16763, 40039, 42509, 96353, 98573, 104183, 119243, 123863, 160093, 161783, 169259, 181789, 185243, 208529, 209719, 232753, 235699, 243343, 246049, 260339, 261799, 270073, 295363, 295703, 302459, 315199, 331399, 362003, 364079, 373669, 380729, 381793, 385943, 414809
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)=24."

Examples

			40039 is followed by 40063 and 40087, consecutive primes with equal distance of 24.
		

Crossrefs

Subsequence of A098974.

Programs

  • Mathematica
    Select[Partition[Prime[Range[40000]],3,1],Differences[#]=={24,24}&][[All,1]] (* Harvey P. Dale, May 09 2019 *)
  • PARI
    list(lim) = {my(p1 = 2, p2 = 3); forprime(p3 = 5, lim, if(p2 - p1 == 24 && p3 - p2 == 24, print1(p1, ", ")); p1 = p2; p2 = p3);} \\ Amiram Eldar, Feb 28 2025

Extensions

Name changed by Jon E. Schoenfield, May 30 2018

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

A053073 Balanced primes separated from the next lower and next higher prime neighbors by 18.

Original entry on oeis.org

20201, 21911, 25391, 29269, 30449, 34631, 50441, 54851, 56149, 58129, 63559, 66431, 74471, 74489, 76561, 76579, 77951, 78259, 81439, 107581, 108439, 110459, 112181, 121421, 122099, 122579, 131041, 132911, 132929, 135301, 137321, 137849
Offset: 1

Views

Author

Harvey P. Dale, Feb 25 2000

Keywords

Examples

			25391 is separated from both the next lower prime and the next higher prime by 18.
		

Crossrefs

Cf. A052189.

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[p-Prime[n-1]==Prime[n+1]-p==6*3,AppendTo[lst,p]],{n,2,3*7!}];lst (* Vladimir Joseph Stephan Orlovsky, May 20 2010 *)
    Transpose[Select[Partition[Prime[Range[20000]],3,1],Differences[#] == {18,18}&]][[2]] (* Harvey P. Dale, Oct 21 2011 *)

Formula

a(n) = A052189(n) + 18. - Sean A. Irvine, Dec 05 2021

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).
    

A374719 Primes p such that p + 48 and p + 96 are also prime.

Original entry on oeis.org

5, 11, 13, 31, 41, 53, 61, 83, 101, 103, 131, 181, 263, 283, 353, 383, 461, 521, 523, 613, 643, 661, 691, 761, 811, 881, 991, 1013, 1021, 1153, 1181, 1201, 1231, 1483, 1511, 1523, 1531, 1571, 1693, 1783, 1901, 1931, 2083, 2293, 2341, 2351, 2671, 2693, 2741
Offset: 1

Views

Author

James S. DeArmon, Jul 17 2024

Keywords

Examples

			5 is a term because 5, 5+48, and 5+96 are all prime.
		

Crossrefs

Programs

Formula

a(n) >> n log^3 n. - Charles R Greathouse IV, Jul 25 2024
Showing 1-9 of 9 results.