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 71-80 of 150 results. Next

A053711 Numbers d such that, for some k, the upper and lower primes closest to k! are k! + d and k! - d.

Original entry on oeis.org

1, 7, 11, 31, 397, 409, 1657, 2131, 7607
Offset: 1

Views

Author

Labos Elemer, Feb 10 2000

Keywords

Comments

This sequence lists d = nextprime(k!) - k! = prevprime(k!) - k! for k in A053709.

Examples

			For k = 10, k! = 3628800, d = 11, and the closest primes to 10! are q = 10! - 11 = 3628789 and p = 10! + 11 = 3628811. The differences d are listed here.
		

Crossrefs

Programs

  • Mathematica
    Reap[Do[If[SameQ @@ #, Sow@ First[#]] &@ Abs[# - NextPrime[#, {-1, 1}]] &[i!], {i, 200}]][[-1, -1]] (* Michael De Vlieger, Jan 14 2022 *)

Extensions

a(5)-a(8) from Donovan Johnson, Oct 12 2008
a(9) from Hans Havermann, Aug 15 2014

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

A085909 Smallest prime p>prime(n) such that p+prime(n+1)-prime(n) is the next prime after p; or a(n)=0 if no such prime exists.

Original entry on oeis.org

0, 5, 11, 13, 17, 19, 29, 37, 31, 41, 47, 43, 59, 67, 53, 61, 71, 73, 79, 101, 83, 97, 131, 359, 103, 107, 109, 137, 127, 293, 163, 151, 149, 181, 179, 157, 167, 193, 173, 233, 191, 241, 197, 223, 227, 211, 467, 229, 239, 277, 251, 269, 283, 257, 263, 271, 281
Offset: 1

Views

Author

Amarnath Murthy, Jul 09 2003

Keywords

Comments

A001223(n) = A001223(A049084(a(n))); a(A001359(n)) = A001359(n+1); conjecture: a(n) > 0 for n > 1 (implies the twin prime conjecture). - Reinhard Zumkeller, Jan 26 2004
For n > 1, a(n) >= prime(n+1) and a(n) = prime(n+1) if prime(n+1) is a balanced prime (A006562). - Zak Seidov, Jun 03 2015

Crossrefs

Programs

  • MATLAB
    P = primes(5000); A = zeros(1, length(P));D = P(2:end) - P(1:(length(P) - 1)); for i = 2:2:(max(D));f = find(D == i); A(f(1:(length(f) - 1))) = P(f(2:end));end;A(2:100) % David Wasserman, Jan 26 2004
  • Mathematica
    a[1] = 0; a[n_] := For[p = Prime[n+1]; d = p - Prime[n], True, p = q, q = NextPrime[p]; If[d == q - p, Return[p]]]; (* Jean-François Alcover, Feb 24 2015 *)

Extensions

More terms from Reinhard Zumkeller and David Wasserman, Jan 26 2004
Edited by N. J. A. Sloane, Oct 21 2008 at the suggestion of R. J. Mathar

A126557 Primes in A126556.

Original entry on oeis.org

174737, 224327, 433813, 541447, 787243, 969667, 980081, 1080787, 1286581, 1372979, 1534513, 1567037, 1570649, 1577189, 1659673, 1726993, 1931291, 2242883, 2282041, 2415557, 2460827, 3162503, 3711047, 4090787, 4450373
Offset: 1

Views

Author

Artur Jasinski, Dec 27 2006

Keywords

Comments

Prime interprimes of third order.
Primes that are the arithmetic mean of two consecutive prime interprimes of second order; primes of the form (A126555(k)+A126555(k+1))/2.

Crossrefs

Cf. A006562 (balanced primes), A024675 (interprimes), A126554 (interprimes of second order), A126555 (prime interprimes of second order), A126556 (interprimes of third order).

Programs

  • PARI
    {m=5000000;a=0;g=0;p=2;q=3;r=5;while(r<=m,if((p+r)/2==q,if(a>0,b=(a+q)/2;if(isprime(b),if(g>0,if(isprime(h=(g+b)/2),print1(h,",")));g=b));a=q);p=q;q=r; r=nextprime(r+1))} \\ Klaus Brockhaus, Jan 11 2007

Extensions

Edited and extended by Klaus Brockhaus, Jan 11 2007

A178954 Primes prime(j) which cannot be written as 2*prime(j) = prime(j+k) + prime(j-k) for any 0 < k < j.

Original entry on oeis.org

2, 3, 7, 19, 23, 43, 47, 73, 79, 109, 113, 149, 163, 199, 223, 227, 229, 239, 241, 269, 271, 281, 283, 293, 313, 317, 463, 467, 499, 503, 509, 523, 619, 659, 661, 673, 677, 683, 691, 719, 829, 839, 859, 883, 887, 967, 1049, 1063, 1069, 1109, 1117, 1129, 1153, 1163, 1201
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 05 2011

Keywords

Comments

Sequence A127925, in which 2*prime(j) < prime(j+k) + prime(j-k) for all 0 < k < j, is a subsequence of this sequence. According to section A14 of Guy, Pomerance proved that A127925 is an infinite sequence. Hence, this sequence is also infinite. - T. D. Noe, Jan 10 2011

References

  • R. K. Guy, Unsolved Problems in Number Theory, 3rd ed. Springer, 2004.

Crossrefs

Programs

  • Maple
    A178609 := proc(n) for k from n-1 to 0 by -1 do if ithprime(n-k)+ithprime(n+k)=2*ithprime(n) then return k; end if; end do: end proc:
    for n from 1 to 200 do if A178609(n) = 0 then printf("%d,",ithprime(n)) ; end if; end do: # R. J. Mathar, Jan 05 2011

Formula

From R. J. Mathar, Jan 05 2011: (Start)
{A000040(k): A178609(k)=0}.
a(n) = A000040(A178953(n)). (End)

A184247 Primes, q, such that for three consecutive primes, p, q & r, with p

Original entry on oeis.org

5, 11, 17, 29, 41, 53, 59, 71, 97, 101, 107, 137, 149, 157, 173, 179, 191, 197, 211, 223, 227, 239, 257, 263, 269, 281, 311, 347, 373, 397, 419, 431, 457, 461, 487, 499, 521, 541, 563, 569, 593, 599, 607, 617, 641, 653, 659, 673, 733, 769, 809, 821, 827, 857
Offset: 1

Views

Author

Robert G. Wilson v, Jan 10 2011

Keywords

Comments

The distance between the cited prime above to its immediate predecessor is divisible by the distance from that prime to its immediate successor.
Intersection(A184247, A184248): 5, 53, 157, 173, 211, ..., = A006562: Balanced primes (of order 1).

Crossrefs

Cf. A184248.

Programs

  • Mathematica
    fQ[n_] := Block[{p = NextPrime[n, -1], q = n, r = NextPrime[n]}, IntegerQ[(q - p)/(r - q)]]; Select[ Prime@ Range[2, 50], fQ]
    Select[Partition[Prime[Range[150]],3,1],IntegerQ[(#[[2]]-#[[1]])/(#[[3]]- #[[2]])]&][[All,2]] (* Harvey P. Dale, Jul 26 2018 *)

A293395 The initial member of 5 consecutive primes whose arithmetic mean is the middle member.

Original entry on oeis.org

71, 271, 337, 431, 631, 661, 769, 1153, 1721, 1789, 2131, 2339, 2381, 2749, 2777, 3313, 3319, 3517, 3919, 4139, 4337, 4729, 4789, 4903, 4937, 4993, 5171, 5303, 5323, 5507, 5849, 5851, 6271, 6323, 6451, 6959, 6983, 7489, 7919, 8221, 8363, 8419, 9349, 9613, 9619
Offset: 1

Views

Author

K. D. Bajpai, Oct 08 2017

Keywords

Comments

3313 is the smallest term such that 3313 +- 6 are both prime.

Examples

			71 is a term because it is the initial member of 5 consecutive primes {71, 73, 79, 83, 89} and (71 + 73 + 79 + 83 + 89)/5 = 79.
271 is a term because it is the initial member of 5 consecutive primes {271, 277, 281, 283, 293} and (271 + 277 + 281 + 283 + 293)/5 = 281.
		

Crossrefs

Programs

  • Maple
    A293395:= proc(n)local a, b, c, d, e; a:=ithprime(n); b:=ithprime(n+1); c:=ithprime(n+2); d:=ithprime(n+3); e:=ithprime(n+4); if (a + b + d + e)/4 = c then RETURN (a); fi; end: seq(A293395(n), n=1..3000);
  • Mathematica
    Select[Prime@ Range[1200], #[[3]] == Mean@ Delete[#, 3] &@ NestList[NextPrime, #, 4] &] (* Michael De Vlieger, Oct 09 2017 *)
    Select[Partition[Prime[Range[1200]],5,1],Mean[#]==#[[3]]&][[;;,1]] (* Harvey P. Dale, Jul 31 2025 *)
  • PARI
    for(n=1, 1000, a=prime(n); b=prime(n+1); c=prime(n+2); d=prime(n+3); e=prime(n+4); if((a+b+d+e)/4==c, print1(a,", ")));
    
  • PARI
    list(lim)=my(v=List(),p=2,q=3,r=5,s=7); forprime(t=11,lim, if(p+q+s+t==4*r, listput(v,p)); p=q; q=r; r=s; s=t); Vec(v) \\ Charles R Greathouse IV, Oct 09 2017

Extensions

Definiyion simplified by David A. Corneth, Oct 14 2017
Examples clarified by Harvey P. Dale, Jul 31 2025

A300365 Balanced primes of order fourteen.

Original entry on oeis.org

5297, 15647, 22073, 22501, 26309, 34721, 43499, 44111, 48809, 57529, 58171, 66797, 69151, 70199, 74551, 76493, 86959, 91297, 93169, 93199, 94343, 102217, 110777, 112289, 113093, 132361, 133493, 135461, 139921, 146021, 155303, 156521, 162557, 163753, 163789
Offset: 1

Views

Author

Muniru A Asiru, Mar 04 2018

Keywords

Examples

			5297 is a member because 5297 = 5167 + 5171 + 5179 + 5189 + 5197 + 5209 + 5227 + 5231 + 5233 + 5237 + 5261 + 5273 + 5279 + 5281 + 5297 + 5303 + 5309 + 5323 + 5333 + 5347 + 5351 + 5381 + 5387 + 5393 + 5399 + 5407 + 5413 + 5417 + 5419  = 153613/29.
		

Crossrefs

Cf. Balanced primes of order b: A006562 (b=1), A082077 (b=2), A082078 (b=3), A082079 (b=4), A096697 (b=5), A096698 (b=6), A096699 (b=7), A096700 (b=8), A096701 (b=9), A096702 (b=10), A096703 (b=11), A096704 (b=12), A300364 (b=13) this sequence (b=14).

Programs

  • GAP
    P:=Filtered([1..200000],IsPrime);;
    a:=List(Filtered(List([0..17000],k->List([1..29],j->P[j+k])),i->Sum(i)/29=i[15]),m->m[15]);
  • Mathematica
    Module[{bal=14,nn=16000},Select[Partition[Prime[Range[nn]],2bal+1,1],Mean[#]==#[[bal+1]]&]][[;;,15]] (* Harvey P. Dale, Jul 07 2023 *)

A303093 Balanced primes of order one ending in 3.

Original entry on oeis.org

53, 173, 263, 373, 563, 593, 653, 733, 1103, 1123, 1223, 1753, 2903, 2963, 3313, 3733, 4013, 4993, 5113, 5303, 5393, 5563, 6073, 6263, 6323, 6373, 6863, 7523, 7583, 7823, 8713, 9473, 10253, 10853, 11903, 11933, 12583, 12653, 12973, 13043, 13463, 14543, 14753
Offset: 1

Views

Author

Muniru A Asiru, Apr 18 2018

Keywords

Examples

			53 = (47 + 53 + 59)/3 = 159/3 and 53 = 5*10 + 3.
		

Crossrefs

Intersection of A006562 and A030431.

Programs

  • GAP
    P:=Filtered([1..15000],IsPrime);;
    a:=Filtered(List(Filtered(List([0..Length(P)-3],k->List([1..3],j->P[j+k])),i->Sum(i)/3=i[2]),m->m[2]),l-> l mod 10=3);
  • Maple
    p:=ithprime: a:=n->`if`(add(p(n-k),k=-1..1)=3*p(n) and modp(p(n), 10) = 3,p(n),NULL): seq(a(n),n=3..2000);
  • Mathematica
    Select[Partition[Prime[Range[2000]],3,1],Mean[#]==#[[2]]&&Mod[#[[2]],10]==3&][[All, 2]] (* Harvey P. Dale, Apr 09 2022 *)

A054801 Second term of balanced prime quartets: p(m)-p(m-1) = p(m+1)-p(m) = p(m+2)-p(m+1).

Original entry on oeis.org

257, 1747, 3307, 5107, 5387, 6317, 6367, 12647, 13457, 14747, 15797, 15907, 17477, 18217, 19477, 23327, 26177, 30097, 30637, 53617, 56087, 62207, 63697, 71347, 74471, 75527, 76561, 77557, 78797, 80917, 82787, 83437, 84437, 89107, 89387
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&]][[2]] (* Harvey P. Dale, Oct 22 2013 *)
Previous Showing 71-80 of 150 results. Next