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

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

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

A058252 Initial prime in set of 4 consecutive primes with common difference 36.

Original entry on oeis.org

5321191, 8606621, 9148351, 41675791, 43251251, 49820291, 51825461, 57791281, 66637721, 73114441, 74055851, 82584841, 86801801, 87620011, 112161451, 123720361, 125810021, 126265751, 136413721, 140969291, 152777291, 153348161
Offset: 1

Views

Author

Harvey P. Dale, Dec 05 2000

Keywords

Comments

Subsequence of A052197. - R. J. Mathar, Apr 12 2008
There are no 5 consecutive primes with common gap 36. - Zak Seidov, Jan 17 2013
If the primes are not required to be consecutive, the sequence starts 31, 241, 281, 311, 751, 911, 941, 1151, 1451, 2621, 4021, ... - Michael B. Porter, Jan 17 2013

Crossrefs

Analogous sequences [with common difference in square brackets]: A033451 [6], A033447 [12], A033448 [18], A052242 [24], A052243 [30]

Programs

  • Mathematica
    Transpose[Select[Partition[Prime[Range[8700000]],4,1], Union[ Differences[#]] =={36}&]][[1]]

Extensions

a(16)-a(22) from Donovan Johnson, Sep 05 2008

A052198 Primes p such that p, p+42, p+84 are consecutive primes.

Original entry on oeis.org

247099, 689467, 1008617, 1629767, 1658627, 2024647, 2750999, 2811719, 2880907, 2921777, 3264449, 3295027, 3311317, 3365449, 3555269, 3668419, 4059229, 4412099, 4440529, 4549309, 4619357, 4690219, 4802947, 4955179, 5115259
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)=42.

Crossrefs

Programs

  • Mathematica
    Select[Partition[Prime[Range[400000]],3,1],Differences[#]=={42,42}&][[All,1]] (* Harvey P. Dale, May 28 2017 *)
  • PARI
    is_A052198(n)=nextprime(n+1)==n+42 && nextprime(n+43)==n+84 && isprime(n) \\ Charles R Greathouse IV, Jan 07 2013, typo corrected by M. F. Hasler, Jan 13 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

A053076 Balanced primes separated from the next lower and next higher prime neighbors by 36.

Original entry on oeis.org

255803, 704357, 806857, 884537, 913103, 1065173, 1216213, 1448533, 1526227, 1532507, 1641007, 1918607, 2071123, 2275103, 2276467, 2336707, 2347627, 2376757, 2778583, 3098597, 3190637, 3248977, 3259037, 3452143, 3558517
Offset: 1

Views

Author

Harvey P. Dale, Feb 25 2000

Keywords

Examples

			255803 is separated from both the next lower prime and the next higher prime by 36.
		

Crossrefs

Cf. A052197.

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[p-Prime[n-1]==Prime[n+1]-p==6*6,AppendTo[lst,p]],{n,2,5*8!}];lst (* Vladimir Joseph Stephan Orlovsky, May 20 2010 *)
    Transpose[Select[Partition[Prime[Range[260000]],3,1],Union[ Differences[#]] == {36}&]][[2]] (* Harvey P. Dale, Sep 28 2012 *)

Formula

a(n) = A052197(n) + 36. - Sean A. Irvine, Dec 06 2021

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