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.

Previous Showing 11-20 of 150 results. Next

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

A051635 Weak primes: prime(n) < (prime(n-1) + prime(n+1))/2.

Original entry on oeis.org

3, 7, 13, 19, 23, 31, 43, 47, 61, 73, 83, 89, 103, 109, 113, 131, 139, 151, 167, 181, 193, 199, 229, 233, 241, 271, 283, 293, 313, 317, 337, 349, 353, 359, 383, 389, 401, 409, 421, 433, 443, 449, 463, 467, 491, 503, 509, 523, 547, 571, 577, 601, 619, 643, 647
Offset: 1

Views

Author

Felice Russo, Nov 15 1999

Keywords

Comments

Primes prime(n) such that prime(n)-prime(n-1) < prime(n+1)-prime(n). - Juri-Stepan Gerasimov, Jan 01 2011
a(n) < A051634(n). a(n) ~ 2*prime(n). - Thomas Ordowski, Jul 25 2012
The inequality above is false. The least counterexample is a(19799) = 496291 > A051634(19799) = 496283. - Amiram Eldar, Nov 26 2023
Erdős called a weak prime an "early prime." He conjectured that there are infinitely many consecutive pairs of early primes, and offered $100 for a proof and $25000 for a disproof (Kuperberg 1992). See A229832 for a stronger conjecture. - Jonathan Sondow, Oct 13 2013

Examples

			7 belongs to the sequence because 7 < (5+11)/2.
		

References

  • A. Murthy, Smarandache Notions Journal, Vol. 11 N. 1-2-3 Spring 2000

Crossrefs

Subsequence of A178943.
Cf. A225495 (multiplicative closure).

Programs

  • Haskell
    a051635 n = a051635_list !! (n-1)
    a051635_list = g a000040_list where
       g (p:qs@(q:r:ps)) = if 2 * q < (p + r) then q : g qs else g qs
    -- Reinhard Zumkeller, May 09 2013
  • Mathematica
    Transpose[Select[Partition[Prime[Range[10^2]], 3, 1], #[[2]]<(#[[1]]+#[[3]])/2 &]][[2]] (* Vladimir Joseph Stephan Orlovsky, May 01 2008 *)
    p=Prime[Range[200]]; p[[Flatten[1+Position[Sign[Differences[p, 2]], 1]]]]
  • PARI
    p=2;q=3;forprime(r=5,1e3,if(2*qCharles R Greathouse IV, Jul 25 2011
    

Formula

a(1) = A229832(1). - Jonathan Sondow, Oct 13 2013
Conjecture: Limit_{n->oo} n / PrimePi(a(n)) = 1/2. - Alain Rocchelli, Mar 17 2024

Extensions

More terms from James Sellers

A051634 Strong primes: prime(k) > (prime(k-1) + prime(k+1))/2.

Original entry on oeis.org

11, 17, 29, 37, 41, 59, 67, 71, 79, 97, 101, 107, 127, 137, 149, 163, 179, 191, 197, 223, 227, 239, 251, 269, 277, 281, 307, 311, 331, 347, 367, 379, 397, 419, 431, 439, 457, 461, 479, 487, 499, 521, 541, 557, 569, 587, 599, 613, 617, 631, 641, 659, 673, 701
Offset: 1

Views

Author

Felice Russo, Nov 15 1999

Keywords

Comments

Prime(k) such that prime(k) - prime(k-1) > prime(k+1) - prime(k). - Juri-Stepan Gerasimov, Jan 01 2011
a(n) > A051635(n). - Thomas Ordowski, Jul 25 2012
The inequality above is false. The least counterexample is a(19799) = 496283 < A051635(19799) = 496291. - Amiram Eldar, Nov 26 2023
Conjecture: Limit_{N->oo} Sum_{n=1..N} (NextPrime(a(n))-a(n)) / a(N) = 1/4. [A heuristic proof is available at www.primepuzzles.net - Conjecture 91] - Alain Rocchelli, Nov 14 2022
A131499 is a subsequence. - Davide Rotondo, Oct 16 2023

Examples

			11 belongs to the sequence because 11 > (7 + 13)/2.
		

References

  • A. Murthy, Smarandache Notions Journal, Vol. 11 N. 1-2-3 Spring 2000.

Crossrefs

Subsequence of A178943.
Cf. A225493 (multiplicative closure), A131499 (subsequence).

Programs

  • Haskell
    a051634 n = a051634_list !! (n-1)
    a051634_list = f a000040_list where
       f (p:qs@(q:r:ps)) = if 2 * q > (p + r) then q : f qs else f qs
    -- Reinhard Zumkeller, May 09 2013
    
  • Maple
    q:= n-> isprime(n) and 2*n>prevprime(n)+nextprime(n):
    select(q, [$3..1000])[];  # Alois P. Heinz, Jun 21 2023
  • Mathematica
    Transpose[Select[Partition[Prime[Range[10^2]], 3, 1], #[[2]]>(#[[1]]+#[[3]])/2 &]][[2]] (* Vladimir Joseph Stephan Orlovsky, May 01 2008 *)
    p=Prime[Range[200]]; p[[Flatten[1+Position[Sign[Differences[p,2]], -1]]]]
  • PARI
    p=2;q=3;forprime(r=5,1e4,if(2*q>p+r,print1(q", "));p=q;q=r) \\ Charles R Greathouse IV, Jul 19 2011
    
  • Python
    from sympy import nextprime
    def aupto(limit):
        alst, p, q, r = [], 2, 3, 5
        while q <= limit:
            if 2*q > p + r: alst.append(q)
            p, q, r = q, r, nextprime(r)
        return alst
    print(aupto(701)) # Michael S. Branicky, Nov 17 2021

Formula

Conjecture: Limit_{n->oo} n / PrimePi(a(n)) = 1/2. - Alain Rocchelli, Mar 17 2024

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

A068361 Numbers n such that the number of squarefree numbers between prime(n) and prime(n+1) = prime(n+1)-prime(n)-1.

Original entry on oeis.org

1, 3, 10, 13, 26, 33, 60, 89, 104, 113, 116, 142, 148, 201, 209, 212, 234, 265, 268, 288, 313, 320, 332, 343, 353, 384, 398, 408, 477, 484, 498, 542, 545, 551, 577, 581, 601, 625, 636, 671, 719, 723, 726, 745, 794, 805, 815, 862, 864, 884, 944, 964, 995, 1054
Offset: 1

Views

Author

Benoit Cloitre, Feb 28 2002

Keywords

Comments

Also numbers k such that all numbers from prime(k) to prime(k+1) are squarefree. All such primes are twins, so this is a subset of A029707. The other twin primes are A061368. - Gus Wiseman, Dec 11 2024

Crossrefs

A subset of A029707 (lesser index of twin primes).
Prime index of each (prime) term of A061351.
Positions of zeros in A061399.
For perfect power instead of squarefree we have A377436, zeros of A377432.
Positions of zeros in A377784.
The rest of the twin primes are at A378620, indices of A061368.
A000040 lists the primes, differences A001223, (run-lengths A333254, A373821).
A005117 lists the squarefree numbers, differences A076259.
A006562 finds balanced primes.
A013929 lists the nonsquarefree numbers, differences A078147.
A014574 is the intersection of A006093 and A008864.
A038664 locates the first prime gap of size 2n.
A046933 counts composite numbers between primes.
A061398 counts squarefree numbers between primes, zeros A068360.
A120327 gives the least nonsquarefree number >= n.

Programs

  • Mathematica
    Select[Range[100],And@@SquareFreeQ/@Range[Prime[#],Prime[#+1]]&] (* Gus Wiseman, Dec 11 2024 *)
  • PARI
    isok(n) = for (k=prime(n)+1, prime(n+1)-1, if (!issquarefree(k), return (0))); 1; \\ Michel Marcus, Apr 29 2016

Formula

n such that A061398(n) = prime(n+1)-prime(n)-1.
prime(a(n)) = A061351(n). - Gus Wiseman, Dec 11 2024

A055380 Central prime p in the smallest (2n+1)-tuple of consecutive primes that are symmetric with respect to p.

Original entry on oeis.org

5, 18731, 683783, 98303927, 60335249959, 1169769749219, 3945769040699039, 159067808851610657, 6919940122097246597
Offset: 1

Views

Author

Jud McCranie, Jun 23 2000

Keywords

Comments

Least n-tuply balanced primes: primes which are averages of both their immediate neighbors, their second neighbors, their third neighbors, ... and their n-th neighbors.
a(9) <= 6919940122097246597. The solution was found by the BOINC project "SPT test project". - Natalia Makarova, Nov 25 2023
a(n) is the smallest number m such that A346399(m) = 2n + 1. - Ya-Ping Lu, May 12 2024

Examples

			In 5-tuple of consecutive primes (18713, 18719, 18731, 18743, 18749), the primes are symmetric w.r.t. its central prime 18731, since 18713+18749 = 18719+18743 = 2*18731, and this is the smallest such 5-tuple. Hence, a(2)=18731.
Alternatively, the symmetry can be seen from the differences between consecutive primes. For (18713, 18719, 18731, 18743, 18749), the differences are (6,12,12,6).
		

Crossrefs

Programs

  • Mathematica
    Table[i = n + 2;
     While[x = Differences[Table[Prime[k + i], {k, -n, n}]];
    x != Reverse[x], i++]; Prime[i], {n, 3}] (* Robert Price, Oct 12 2019 *)

Formula

a(n) = A151800^(n)(A175309(2n)), i.e., A151800 applied n times on A175309(2n). - Max Alekseyev, Jul 26 2014

Extensions

a(6) from Donovan Johnson, Mar 09 2008
Definition corrected by Max Alekseyev, Jul 29 2014
a(7) from Dmitry Petukhov, added by Max Alekseyev, Nov 03 2014
a(8) from SPT project, added by Dmitry Petukhov, Apr 06 2017
a(9) from SPT project, added by Dmitry Petukhov, Mar 25 2025

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

A082077 Balanced primes of order two.

Original entry on oeis.org

79, 281, 349, 439, 643, 677, 787, 1171, 1733, 1811, 2141, 2347, 2389, 2767, 2791, 3323, 3329, 3529, 3929, 4157, 4349, 4751, 4799, 4919, 4951, 5003, 5189, 5323, 5347, 5521, 5857, 5861, 6287, 6337, 6473, 6967, 6997, 7507, 7933, 8233, 8377, 8429, 9377, 9623, 9629, 10093, 10333
Offset: 1

Views

Author

Labos Elemer, Apr 08 2003

Keywords

Comments

The arithmetic mean of 4 primes in its "neighborhood"; not to be confused with 'Doubly balanced primes' (A051795).
Balanced primes of order two are not necessarily balanced of order one (A006562) or three (A082078).
Subsequence of A219478, Peter Schorn, May 01 2025

Examples

			p = 79 = (71 + 73 + 79 + 83 + 89)/5 = 395/5 i.e. it is both the arithmetic mean and median.
		

Crossrefs

Programs

  • Mathematica
    Do[s3=Prime[n]+Prime[n+1]+Prime[n+2]; s5=Prime[n-1]+s3+Prime[n+3]; If[Equal[s5/5, Prime[n+1]], Print[Prime[n+1]]], {n, 3, 3000}]
    Select[Partition[Prime[Range[1500]],5,1],Mean[#]==#[[3]]&][[All,3]] (* Harvey P. Dale, Nov 04 2019 *)
  • PARI
    p=2;q=3;r=5;s=7;forprime(t=11,1e9,if(p+q+s+t==4*r,print1(r", ")); p=q; q=r; r=s; s=t) \\ Charles R Greathouse IV, Nov 20 2012

A054803 Fourth term of balanced prime quartets: p(m-2)-p(m-3) = p(m-1)-p(m-2) = p(m)-p(m-1).

Original entry on oeis.org

269, 1759, 3319, 5119, 5399, 6329, 6379, 12659, 13469, 14759, 15809, 15919, 17489, 18229, 19489, 23339, 26189, 30109, 30649, 53629, 56099, 62219, 63709, 71359, 74507, 75539, 76597, 77569, 78809, 80929, 82799, 83449, 84449, 89119, 89399
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Crossrefs

Programs

  • Mathematica
    Transpose[Select[Partition[Prime[Range[9000]],4,1],Length[Union[ Differences[ #]]]==1&]][[4]] (* Harvey P. Dale, Aug 27 2012 *)

A082079 Balanced primes of order four.

Original entry on oeis.org

491, 757, 1787, 3571, 6337, 6451, 6991, 7741, 7907, 8821, 10141, 10267, 10657, 12911, 15299, 16189, 18223, 18701, 19801, 19843, 19853, 19937, 21961, 22543, 22739, 22807, 23893, 23909, 24767, 25169, 25391, 26591, 26641, 26693, 26713
Offset: 1

Views

Author

Labos Elemer, Apr 08 2003

Keywords

Comments

The arithmetic mean of 8 primes in its "neighborhood"; not to be confused with 'Quadruply balanced primes' (A096710).
A balanced prime of order four is not necessarily balanced (A006562) order one, or of order two (A082077), or of order three (A082078), etc.

Examples

			p = 491 = (463 + 467 + 479 + 487 + 491 + 499 + 503 + 509 + 521)/9 = 4419/9.
		

Crossrefs

Programs

  • GAP
    P:=Filtered([1..50000],IsPrime);;
    a:=List(Filtered(List([0..3000],k->List([5..13],j->P[j-4+k])), i-> Sum(i)/9=i[5]),m->m[5]); # Muniru A Asiru, Feb 14 2018
    
  • Mathematica
    Do[s3=Prime[n]+Prime[n+1]+Prime[n+2]; s5=Prime[n-1]+s3+Prime[n+3]; s7=Prime[n-2]+s5+Prime[n+4]; s9=Prime[n-3]+s7+Prime[n+5]; If[Equal[s9/9, Prime[n+1]], Print[Prime[n+1]]], {n, 4, 10000}]
    (* Second program: *)
    With[{k = 4}, Select[MapIndexed[{Prime[First@ #2 + k], #1} &, Mean /@ Partition[Prime@ Range[3000], 2 k + 1, 1]], SameQ @@ # &][[All, 1]]] (* Michael De Vlieger, Feb 15 2018 *)
    Select[Partition[Prime[Range[3000]],9,1],Mean[#]==#[[5]]&][[;;,5]] (* Harvey P. Dale, Mar 09 2023 *)
  • PARI
    isok(p) = {if (isprime(p), k = primepi(p); if (k > 4, sum(i=k-4, k+4, prime(i)) == 9*p;););} \\ Michel Marcus, Mar 07 2018
Previous Showing 11-20 of 150 results. Next