A046869 Good primes (version 1): prime(n)^2 > prime(n-1)*prime(n+1).
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
Keywords
Examples
37 is a member as 37^2 = 1369 > 31*41 = 1271.
References
- R. K. Guy, Unsolved Problems in Number Theory, Section A14.
Links
- T. D. Noe, Table of n, a(n) for n = 1..10000
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
Comments