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

A178943 Primes that are not balanced primes (see A006562).

Original entry on oeis.org

2, 3, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 163, 167, 179, 181, 191, 193, 197, 199, 223, 227, 229, 233, 239, 241, 251, 269, 271, 277, 281, 283, 293
Offset: 1

Views

Author

Paul Muljadi, Dec 30 2010

Keywords

Crossrefs

Complement with respect to A000040 gives A006562.
Union of {2}, A051634 and A051634; A225496 (multiplicative closure).

Programs

  • Haskell
    a178943 n = a178943_list !! (n-1)
    a178943_list = 2 : h a000040_list where
       h (p:qs@(q:r:ps)) = if 2 * q /= (p + r) then q : h qs else h qs
    -- Reinhard Zumkeller, May 09 2013
  • Mathematica
    Transpose[ Select[ Partition[ Prime@ Range@ 65, 3, 1],#[[2]]!=(#[[1]]+#[[3]])/2&]][[2]]

A358530 a(n) = n-th prime prime(k) such that prime(k) - prime(k-1) < prime(k-1) - prime(k-2).

Original entry on oeis.org

13, 19, 31, 41, 43, 61, 71, 73, 83, 101, 103, 109, 131, 139, 151, 167, 181, 193, 199, 227, 229, 241, 257, 271, 281, 283, 311, 313, 337, 349, 373, 383, 401, 421, 433, 443, 461, 463, 487, 491, 503, 523, 547, 563, 571, 593, 601, 617, 619, 641, 643, 661, 677
Offset: 1

Views

Author

Clark Kimberling, Nov 21 2022

Keywords

Comments

This sequence, together with A358528 and A181424, partition the set of primes >= 5. The corresponding sequences of indices, A358531, A358529, and A356347, partition the set of positive integers >= 3.

Examples

			  n           1   2   3   4   5   6   7
  k           6   8  11  13  14  18  20
  prime(n)   13  19  31  41  43  61  71
		

Crossrefs

Programs

  • Mathematica
    t = Select[2 + Range[140],
    Prime[#] - Prime[# - 1] < Prime[# - 1] - Prime[# - 2] &]  (* A358531 *)
    Prime[t]  (* A358530 *)

Formula

a(n) = A151800(A051634(n)). - Andrew Howroyd, Sep 21 2024

Extensions

Incorrect formula removed by Georg Fischer, Sep 21 2024

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

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

A264719 Numbers that are greater than the average of their closest flanking primes.

Original entry on oeis.org

10, 11, 16, 17, 22, 27, 28, 29, 35, 36, 37, 40, 41, 46, 51, 52, 57, 58, 59, 65, 66, 67, 70, 71, 77, 78, 79, 82, 87, 88, 94, 95, 96, 97, 100, 101, 106, 107, 112, 121, 122, 123, 124, 125, 126, 127, 130, 135, 136, 137, 145, 146, 147, 148, 149, 155, 156, 161, 162
Offset: 1

Views

Author

Chris Boyd, Nov 21 2015

Keywords

Comments

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

Examples

			a(11) = 37 because 37 > (31 + 41)/2 = 36.
a(12) = 40 because 40 > (37 + 41)/2 = 37.
		

Crossrefs

Programs

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

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

A102552 a(n) = prime(n) - (prime(n+1) + prime(n-1))/2.

Original entry on oeis.org

0, -1, 1, -1, 1, -1, -1, 2, -2, 1, 1, -1, -1, 0, 2, -2, 1, 1, -2, 1, -1, -1, 2, 1, -1, 1, -1, -5, 5, -1, 2, -4, 4, -2, 0, 1, -1, 0, 2, -4, 4, -1, 1, -5, 0, 4, 1, -1, -1, 2, -4, 2, 0, 0, 2, -2, 1, 1, -4, -2, 5, 1, -1, -5, 4, -2, 4, -1, -1, -1, 1, 0, 1, -1, -1, 2, -2, -1, 4, -4, 4, -2, 1, -1, -1, 2, 1, -1, -4, 2, 2, -2, 2, -1, -3, 5, -8, 6, -2, 2, 0, 2, -2
Offset: 3

Views

Author

Yasutoshi Kohmoto, Feb 25 2005

Keywords

Examples

			a(6)=-1 because 13-(17+11)/2=-1.
		

References

  • Eric Weisstein, CRC Concise Encyclopedia of Mathematics, 1998, page 1321.

Crossrefs

Programs

  • Magma
    A102552:= func< n | (2*NthPrime(n)-NthPrime(n+1)-NthPrime(n-1))/2 >;
    [A102552(n): n in [3..120]]; // G. C. Greubel, Feb 02 2025
  • Maple
    a:=n->ithprime(n)-(ithprime(n+1)+ithprime(n-1))/2: seq(a(n),n=3..95); # Emeric Deutsch, Mar 02 2005
  • Mathematica
    f[n_] := Prime[n] - (Prime[n - 1] + Prime[n + 1])/2; Table[f[n], {n, 3, 107}] (* Robert G. Wilson v, Sep 25 2006 *)
    #[[2]]-(#[[1]]+#[[3]])/2&/@Partition[Prime[Range[2,110]],3,1] (* Harvey P. Dale, Sep 21 2013 *)
  • PARI
    a(n) = prime(n)-(prime(n+1)+prime(n-1))/2;
    vector(100,n,a(n+2)) \\ Joerg Arndt, Jan 20 2015
    
  • Python
    from sympy import sieve as p
    def A102552(n): return p[n]-(p[n+1]+p[n-1])//2 # Karl-Heinz Hofmann, May 22 2024
    

Formula

a(n) = (1/2)*(A001223(n) - A001223(n+1)).
a(n) = -A036263(n-1)/2. - T. D. Noe, Oct 06 2006 [corrected by Georg Fischer, Oct 19 2023]

Extensions

More terms from Emeric Deutsch, Mar 02 2005
Previous Showing 11-20 of 41 results. Next