OFFSET
1,1
COMMENTS
The geometric mean of two primes p and q is sqrt(pq).
Except for 3, these are also primes prime(k) such that (prime(k-1) + prime(k+1))/2 = prime(k)+1, verified up to k=50000. - Richard R. Forberg, Jun 29 2015
Primes prime(k) such that (prime(k)+1)^2 > prime(k-1)*prime(k+1) > prime(k)^2. - Robert Israel, Jul 10 2015
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
The primes before and after the prime 3 are 2 and 5, so the geometric mean is sqrt(2*5)=sqrt(10)=3.16227766..., whose integer part is 3. Therefore 3 is in the sequence.
The primes before and after the prime 11 are 7 and 13. The geometric mean of 7 and 13 is sqrt(7*13)=9.539392... whose integer part is 9 and not 11, hence 11 is not in the sequence.
MAPLE
A := {}: for n from 2 to 1000 do p1 := ithprime(n-1); p := ithprime(n); p2 := ithprime(n+1); if p = floor(sqrt(p1*p2)) then A := `union`(A, {p}) end if end do; A := A
MATHEMATICA
t = {}; Do[p = Prime[n]; If[Floor[GeometricMean[{Prime[n-1], Prime[n+1]}]] == p, AppendTo[t, p]], {n, 2, 200}]; t (* T. D. Noe, Sep 04 2012 *)
PROG
(PARI) first(m)=my(v=vector(m)); t=2; k=1; while(k<=m, p=prime(t); if(p==floor(sqrt(prime(t-1)*prime(t+1))), v[k]=p; k++); t++); v; /* Anders Hellström, Aug 03 2015 */
CROSSREFS
KEYWORD
nonn
AUTHOR
César Eliud Lozada, Sep 01 2012
STATUS
approved