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 49 results. Next

A124661 Primes prime(n) such that prime(n-k)+prime(n+k) >= 2*prime(n) for k = 1..n-2.

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 23, 31, 43, 47, 73, 83, 109, 113, 181, 199, 283, 293, 313, 317, 463, 467, 503, 509, 523, 619, 661, 683, 691, 887, 1063, 1069, 1103, 1109, 1123, 1129, 1303, 1307, 1321, 1327, 1613, 1621, 1627, 1637, 1669, 1789
Offset: 1

Views

Author

Artur Jasinski, Dec 23 2006

Keywords

Comments

The first two primes, 2 and 3, are tested against an empty set of k, and we include them, defining such a test to have a positive outcome.
McNew's "popular primes" sequence (A385503) has the same first 14 terms, differing first by excluding 181. McNew says that a prime p is "popular" on an interval [2, k] if no prime occurs more frequently than p as the greatest prime factor (gpf, A006530) of the integers in that interval. - N. J. A. Sloane, Jul 25 2017 and Peter Munn, Jul 01 2025
See the Pomerance link for a proof that the sequence is infinite. - Peter Munn, Jul 01 2025

Examples

			prime(11)=31 is in the sequence because prime(10)+prime(12) = 66, prime(9)+prime(13) = 64,..., prime(2)+prime(20) = 74 are all >= 62 = 2*31.
prime(10) = 29 is not in the sequence because prime(9)+prime(11) = 54 for example is smaller than 58 = 2*29.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime@ Range@ 300, Function[{p, n}, NoneTrue[Range[n - 2], Prime[n - #] + Prime[n + #] < 2 p &]] @@ {#, PrimePi@ #} &] (* Michael De Vlieger, Jul 25 2017 *)
  • PARI
    isok(p) = {n = primepi(p); for (k=1, n-2, if (prime(n-k) + prime(n+k) < 2*p, return (0));); return (1);}
    lista(nn) = {for(n=1, nn, if (isok(prime(n)), print1(prime(n), ", ");););} \\ Michel Marcus, Nov 03 2013
    
  • Python
    from sympy import prime
    A124661_list = []
    for n in range(1,10**6):
        p = prime(n)
        for k in range(1,n-1):
            if prime(n-k)+prime(n+k) < 2*p:
                break
        else:
            A124661_list.append(p) # Chai Wah Wu, Jul 25 2017

Extensions

Sequence extended by R. J. Mathar, Mar 28 2010
Edited, restoring previous name, by Peter Munn, Jul 01 2025

A054806 Third term of strong prime quartets: prime(m+1)-prime(m) > prime(m+2)-prime(m+1) > prime(m+3)-prime(m+2).

Original entry on oeis.org

41, 71, 101, 227, 281, 311, 461, 487, 617, 641, 727, 757, 857, 881, 937, 1091, 1301, 1427, 1451, 1481, 1549, 1663, 1667, 1697, 1741, 1783, 1787, 1861, 1867, 1871, 1993, 1997, 2063, 2141, 2339, 2377, 2381, 2467, 2473, 2521, 2531, 2539, 2591, 2617, 2657
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Crossrefs

Cf. A051634, A051635; A054800 .. A054803: members of balanced prime quartets (= 4 consecutive primes in arithmetic progression); A054804 .. A054818: members of strong prime quartet, quintet, sextet; A054819 .. A054840: members of weak prime quartet, quintet, sextet, septets.

Programs

  • Mathematica
    Select[Partition[Prime[Range[400]],4,1],Max[Differences[#,2]]<0&][[All,3]] (* Harvey P. Dale, Aug 28 2021 *)

Formula

a(n) = nextprime(A054805(n)) = prevprime(A054807(n)), nextprime = A151800, prevprime = A151799. - M. F. Hasler, Oct 27 2018

Extensions

Offset corrected to 1 by M. F. Hasler, Oct 27 2018
Definition clarified by N. J. A. Sloane, Aug 28 2021

A054808 First term of strong prime quintets: p(m+1)-p(m) > p(m+2)-p(m+1) > p(m+3)-p(m+2) > p(m+4)-p(m+3).

Original entry on oeis.org

1637, 1759, 1831, 1847, 1979, 2357, 2447, 2477, 2503, 3413, 3433, 4177, 4493, 5237, 5399, 5419, 6011, 6619, 7219, 7253, 7727, 7853, 7907, 8123, 8467, 9551, 9587, 11003, 11353, 11551, 11813, 12379, 13841, 14797, 15107, 15511, 16007, 16273, 16787, 16993, 17359, 18149, 18289
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Comments

First member of pairs of consecutive primes in A054804 (first of strong quartets): The first 10^4 terms of that sequence yield over 2000 terms of this sequence. - M. F. Hasler, Oct 27 2018

Crossrefs

Cf. A051634, A051635; A054800 .. A054803: members of balanced prime quartets (= 4 consecutive primes in arithmetic progression); A054804 .. A054818: members of strong prime quartets, quintets, sextets; A054819 .. A054840: members of weak prime quartets, quintets, sextets, septets.

Programs

Formula

a(n) = prevprime(A054809(n)); A054808 = {m = A054804(n) | nextprime(m) = A054804(n+1)}; nextprime = A151800, prevprime = A151799. - M. F. Hasler, Oct 27 2018

Extensions

Edited and offset corrected to 1 by M. F. Hasler, Oct 27 2018

A054835 Second term of weak prime septet: p(m)-p(m-1) < p(m+1)-p(m) < p(m+2)-p(m+1) < p(m+3)-p(m+2) < p(m+4)-p(m+3) < p(m+5)-p(m+4).

Original entry on oeis.org

15377, 64921, 68209, 68899, 128983, 128987, 143513, 154081, 158003, 192377, 221719, 222389, 244463, 249727, 285289, 318679, 337279, 354373, 357829, 374177, 385393, 394729, 402583, 402587, 419599, 439163, 441913, 448379, 457399, 457673, 458191, 482509, 527983, 529813, 577531, 582763, 655913
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Crossrefs

Cf. A054800 .. A054803: members of balanced prime quartets (= consecutive primes in arithmetic progression); A054804 .. A054818: members of strong prime quartet, quintet, sextet; A054819 .. A054840: members of weak prime quartet, quintet, sextet, septets.

Formula

a(1) = A229832(5). - Jonathan Sondow, Oct 13 2013
a(n) = A151800(A054834(n)) = A151799(A054836(n)), A151800 = nextprime, A151799 = prevprime; A054835 = { m = A054828(n) | m = nextprime(A054828(n-1)) }. - M. F. Hasler, Oct 27 2018

Extensions

More terms from M. F. Hasler, Oct 27 2018

A054838 Fifth term of weak prime septet: p(m-3)-p(m-4) < p(m-2)-p(m-3) < p(m-1)-p(m-2) < p(m)-p(m-1) < p(m+1)-p(m) < p(m+2)-p(m+1).

Original entry on oeis.org

15401, 64951, 68227, 68917, 129001, 129011, 143537, 154111, 158029, 192407, 221737, 222437, 244493, 249763, 285343, 318701, 337301, 354391, 357883, 374219, 385417, 394747, 402601, 402613, 419623, 439199, 441953, 448421, 457421, 457697, 458219, 482527, 528001
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Crossrefs

Cf. A051635; A054800 .. A054803: members of balanced prime quartets (= consecutive primes in arithmetic progression); A054804 .. A054818: members of strong prime quartet, quintet, sextet; A054819 .. A054840: members of weak prime quartet, quintet, sextet, septets.

Programs

  • Mathematica
    Select[Partition[Prime[Range[7000]],7,1],Min[Differences[#,2]]>0&][[All,5]] (* Harvey P. Dale, Oct 15 2016 *)

Formula

a(n) = A151800(A054837(n)) = A151799(A054839(n)), A151800 = nextprime, A151799 = prevprime; A054838 = { m = A054831(n) | m = nextprime(A054831(n-1)) }. - M. F. Hasler, Oct 27 2018

Extensions

More terms from Harvey P. Dale, Oct 15 2016

A068828 Geometrically weak primes: primes that are smaller than the geometric mean of their neighbors (2 is included by convention).

Original entry on oeis.org

2, 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
Offset: 1

Views

Author

Amarnath Murthy, Mar 08 2002

Keywords

Comments

Or, bad primes (version 1): primes not in A046869. - Jonathan Vos Post, Aug 20 2007
The idea can be extended by defining a geometrically weak prime of order k to be a prime which is less than the geometric mean of r neighbors on both sides for all r = 1 to k and not true for r = k+1. A similar extension could be defined for the sequence A051635.
It is easy to show that, except for the twin prime pair (3,5), the larger prime of every twin prime pair is in this sequence. The smaller prime of the pair is always in A046869. - T. D. Noe, Feb 19 2008

Examples

			23 belongs to this sequence as 23^2 = 529 < 19*29 = 551.
		

Crossrefs

Programs

  • Mathematica
    Join[{2}, Prime[Select[Range[2, 120], Prime[ # ]^2 <= Prime[ # - 1]*Prime[ # + 1]&]]] (* Stefan Steinerberger, Aug 21 2007 *)
    Join[{2},Transpose[Select[Partition[Prime[Range[500]],3,1],#[[2]]< GeometricMean[ {#[[1]],#[[3]]}]&]][[2]]] (* Harvey P. Dale, Apr 05 2014 *)

Formula

prime(k)^2 <= prime(k-1)*prime(k+1).

Extensions

Corrected and extended by Stefan Steinerberger, Aug 21 2007
Edited by N. J. A. Sloane, Feb 19 2008

A264720 Numbers that are less than the average of their closest flanking primes.

Original entry on oeis.org

3, 7, 8, 13, 14, 19, 20, 23, 24, 25, 31, 32, 33, 38, 43, 44, 47, 48, 49, 54, 55, 61, 62, 63, 68, 73, 74, 75, 80, 83, 84, 85, 89, 90, 91, 92, 98, 103, 104, 109, 110, 113, 114, 115, 116, 117, 118, 119, 128, 131, 132, 133, 139, 140, 141, 142, 143, 151, 152, 153, 158
Offset: 1

Views

Author

Chris Boyd, Nov 21 2015

Keywords

Comments

Numbers that are nearer to the immediately previous prime than to the immediately next prime.
This sequence may be viewed as a generalization of A051635 (the weak primes) that includes qualifying composite numbers.
The union of this sequence with A264719 & A145025 is A000027 (omitting 1 & 2).

Examples

			a(11) = 31 because 31 < (29 + 37)/2 = 33.
a(12) = 32 because 32 < (31 + 37)/2 = 34.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 162, # < (NextPrime[#, -1] + NextPrime@ #)/2 &] (* Michael De Vlieger, Nov 22 2015 *)
  • PARI
    test(n)= {if(n-precprime(n-1)2,return(1),return(0))}
    for(i=1,200,if(test(i),print1(i,", ")))

A054809 Second term of strong prime 5-tuples: p(m)-p(m-1) > p(m+1)-p(m) > p(m+2)-p(m+1) > p(m+3)-p(m+2).

Original entry on oeis.org

1657, 1777, 1847, 1861, 1987, 2371, 2459, 2503, 2521, 3433, 3449, 4201, 4507, 5261, 5407, 5431, 6029, 6637, 7229, 7283, 7741, 7867, 7919, 8147, 8501, 9587, 9601, 11027, 11369, 11579, 11821, 12391, 13859, 14813, 15121, 15527, 16033, 16301, 16811, 17011, 17377
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Comments

Initial member of pairs of consecutive primes in A054805 (second of quadruples): The first 10^4 terms of that sequence yield over 2000 terms of this sequence. - M. F. Hasler, Oct 27 2018

Crossrefs

Cf. A051634, A051635; A054800 .. A054803: members of balanced prime quadruples (= 4 consecutive primes in arithmetic progression); A054804 .. A054818: members of strong prime 4-tuples, 5-tuples, 6-tuples; A054819 .. A054840: members of weak prime 4-tuples, ..., 7-tuples.

Programs

  • Mathematica
    spqQ[n_]:=Module[{difs=Differences[n]},difs[[1]]>difs[[2]]> difs[[3]]> difs[[4]]]; Transpose[Select[Partition[Prime[ Range[2000]],5,1], spqQ]][[2]] (* Harvey P. Dale, May 06 2012 *)

Formula

a(n) = nextprime(A054808(n)) = prevprime(A054810(n)), nextprime = A151800, prevprime = A151799; A054809 = {m = A054805(n) | nextprime(m) = A054805(n+1)}. - M. F. Hasler, Oct 27 2018

Extensions

Corrected by Harvey P. Dale, May 06 2012
Edited and offset corrected to 1 by M. F. Hasler, Oct 27 2018

A054810 Third term of strong prime 5-tuples: p(m-1)-p(m-2) > p(m)-p(m-1) > p(m+1)-p(m) > p(m+2)-p(m+1).

Original entry on oeis.org

1663, 1783, 1861, 1867, 1993, 2377, 2467, 2521, 2531, 3449, 3457, 4211, 4513, 5273, 5413, 5437, 6037, 6653, 7237, 7297, 7753, 7873, 7927, 8161, 8513, 9601, 9613, 11047, 11383, 11587, 11827, 12401, 13873, 14821, 15131, 15541, 16057, 16319
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Crossrefs

Cf. A051634, A051635; A054800 .. A054803: members of balanced prime quadruples (= 4 consecutive primes in arithmetic progression); A054804 .. A054818: members of strong prime 4-tuples, 5-tuples, 6-tuples; A054819 .. A054840: members of weak prime 4-tuples, ..., 7-tuples.

Programs

  • Mathematica
    spqQ[{a_,b_,c_,d_,e_}]:=(b-a)>(c-b)>(d-c)>(e-d); Transpose[ Select[ Partition[ Prime[ Range[2000]],5,1],spqQ]][[3]] (* Harvey P. Dale, Feb 25 2013 *)

Extensions

Edited and offset corrected to 1 by M. F. Hasler, Oct 27 2018

A054828 First term of weak prime sextet: p(m+1)-p(m) < p(m+2)-p(m+1) < p(m+3)-p(m+2) < p(m+4)-p(m+3) < p(m+5)-p(m+4).

Original entry on oeis.org

2903, 13463, 13901, 14947, 15373, 15377, 21397, 21557, 21859, 28277, 30869, 33199, 35591, 37691, 42221, 42569, 45821, 55661, 64661, 64919, 64921, 68207, 68209, 68897, 68899, 73939, 74201, 78577, 83089, 85513, 87313, 88001, 90907
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Crossrefs

Programs

  • Mathematica
    Transpose[Select[Partition[Prime[Range[9000]],6,1],AllTrue[ Differences[ #,2], Positive]&]] [[1]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 12 2014 *)
Previous Showing 11-20 of 49 results. Next