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

A046869 Good primes (version 1): prime(n)^2 > prime(n-1)*prime(n+1).

Original entry on oeis.org

5, 11, 17, 29, 37, 41, 53, 59, 67, 71, 79, 97, 101, 107, 127, 137, 149, 157, 163, 173, 179, 191, 197, 211, 223, 227, 239, 251, 257, 263, 269, 277, 281, 307, 311, 331, 347, 367, 373, 379, 397, 419, 431, 439, 457, 461, 479, 487, 499, 521, 541
Offset: 1

Views

Author

Keywords

Comments

Also called geometrically strong primes. - Amarnath Murthy, Mar 08 2002
The idea can be extended by defining a geometrically strong prime of order k to be a prime that is greater than the geometric mean of r neighbors on both sides for all r = 1 to k but not for r = k+1. Similar generalizations can be applied to the sequence A051634. - Amarnath Murthy, Mar 08 2002
It appears that a(n) ~ 2*prime(n). - Thomas Ordowski, Jul 25 2012
Conjecture: primes p(n) such that 2*p(n) >= p(n-1) + p(n+1). - Thomas Ordowski, Jul 25 2012
Probably {3,7,23} U {good primes} = {primes p(n) > 2/(1/p(n-1) + 1/p(n+1))}. - Thomas Ordowski, Jul 27 2012
Except for A001359(1), A001359 is a subsequence. - Chai Wah Wu, Sep 10 2019

Examples

			37 is a member as 37^2 = 1369 > 31*41 = 1271.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, Section A14.

Crossrefs

Programs

  • Magma
    [NthPrime(n): n in [2..100] | NthPrime(n)^2 gt NthPrime(n-1)*NthPrime(n+1)]; // Bruno Berselli, Oct 23 2012
  • Maple
    with(numtheory): a := [ ]: P := [ ]: M := 300: for i from 2 to M do if p(i)^2>p(i-1)*p(i+1) then a := [ op(a),i ]; P := [ op(P),p(i) ]; fi; od: a; P;
  • Mathematica
    Do[ If[ Prime[n]^2 > Prime[n - 1]*Prime[n + 1], Print[ Prime[n] ] ], {n, 2, 100} ]
    Transpose[Select[Partition[Prime[Range[300]],3,1],#[[2]]^2>#[[1]]#[[3]]&]][[2]] (* Harvey P. Dale, May 13 2012 *)
    Select[Prime[Range[2, 100]], #^2 > NextPrime[#]*NextPrime[#, -1] &] (* Jayanta Basu, Jun 29 2013 *)
  • PARI
    forprime(n=o=p=3,999,o+0<(o=p)^2/(p=n) & print1(o", "))
    isA046869(p)={ isprime(p) & p^2>precprime(p-1)*nextprime(p+1) } \\ M. F. Hasler, Jun 15 2011
    

Extensions

Corrected and extended by Robert G. Wilson v, Dec 06 2000
Edited by N. J. A. Sloane at the suggestion of Giovanni Resta, Aug 20 2007

A130903 Bad primes (version 2). Primes not in A028388.

Original entry on oeis.org

2, 3, 7, 13, 19, 23, 31, 43, 47, 61, 73, 79, 83, 89, 103, 107, 109, 113, 131, 137, 139, 151, 157, 163, 167, 173, 181, 193, 197, 199, 211, 229, 233, 239, 241, 263, 271, 277, 281, 283, 293, 313, 317, 337, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 421
Offset: 1

Views

Author

Jonathan Vos Post, Aug 22 2007

Keywords

Crossrefs

Programs

  • Maple
    isA028388 := proc(p) local a,n,pmin,pplu; if isprime(p) then a := true ; if p < 5 then RETURN(false) ; fi ; pmin := p ; pplu := p ; while pmin > 2 do pmin := prevprime(pmin) ; pplu := nextprime(pplu) ; if p^2 <= pmin*pplu then a := false ; break ; fi ; od: RETURN(a) ; else RETURN(false) ; fi ; end: isA130903 := proc(p) if not isprime(p) then RETURN(false) ; else RETURN(not isA028388(p)) ; fi ; end: for i from 1 to 100 do p := ithprime(i) ; if isA130903(p) then printf("%d,",p) ; fi ; od: # R. J. Mathar, Sep 02 2007

Formula

{p in A000040 and p not in A028388}.

Extensions

Corrected and extended by R. J. Mathar, Sep 02 2007

A139312 Characteristic function of the good primes (version 1).

Original entry on oeis.org

0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0
Offset: 2

Views

Author

Roger L. Bagula, Jun 07 2008

Keywords

Comments

a(n)=1 if prime(n)^2 - prime(n-1)*prime(n+1) >=0, else a(n)=0.

Crossrefs

Programs

  • Mathematica
    f[n_] := If[ Prime[n]^2 - Prime[n - 1]*Prime[n + 1] > 0, 1, 0]; Array[f, 105, 2] (*alternative formula: derived*) Solve[x^2 - (x - a)*(x + b) == 0, x]; a = -Prime[n - 1] + Prime[n]; b = -Prime[n] + Prime[n + 1]; f[n_] = If[-Prime[-1 + n] + 2 Prime[n] - Prime[1 + n] == 0, 0, a*b/(b - a)]; Table[ If[ f[n] > 0, 0, 1], {n, 2, 106}]
    If[#[[2]]^2-(#[[1]]#[[3]])>=0,1,0]&/@Partition[Prime[Range[110]],3,1] (* Harvey P. Dale, Jan 25 2015 *)
  • PARI
    a(n)=my(p=prime(n));p^2>=precprime(p-1)*nextprime(p+1) \\ Charles R Greathouse IV, Jun 24 2011

Formula

a(n) = 1 if A056221(n-1)<=0, else a(n)=0.

Extensions

All entries corrected. - R. J. Mathar, Charles R Greathouse IV Robert G. Wilson v, Jun 16 2011
Showing 1-3 of 3 results.