login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A216098 Primes that are equal to the floor of the geometric mean of the previous prime and the following prime. 2

%I #39 Aug 04 2015 01:10:29

%S 3,7,13,19,23,43,47,83,89,103,109,131,167,193,229,233,313,349,353,359,

%T 383,389,409,443,449,463,503,643,647,677,683,691,709,797,823,859,883,

%U 919,941,971,983,1013,1093,1097,1109,1171,1193,1217,1279,1283,1303,1373

%N Primes that are equal to the floor of the geometric mean of the previous prime and the following prime.

%C The geometric mean of two primes p and q is sqrt(pq).

%C 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

%C Primes prime(k) such that (prime(k)+1)^2 > prime(k-1)*prime(k+1) > prime(k)^2. - _Robert Israel_, Jul 10 2015

%H Robert Israel, <a href="/A216098/b216098.txt">Table of n, a(n) for n = 1..10000</a>

%e 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.

%e 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.

%p 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

%t 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 *)

%o (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 */

%Y Cf. A006562, A216124.

%K nonn

%O 1,1

%A _César Eliud Lozada_, Sep 01 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)