login
Primes whose integer square root remainder is also prime.
6

%I #7 Jan 25 2015 21:12:23

%S 3,7,11,19,23,41,43,47,67,71,83,103,107,113,149,151,157,163,167,199,

%T 227,263,269,331,337,347,353,419,431,443,487,491,503,521,587,593,599,

%U 607,613,617,619,683,719,787,797,821,827,907,911,919,929,937,941,947

%N Primes whose integer square root remainder is also prime.

%C The integer square root of an integer x >= 0 can be defined as floor(sqrt(x)) and the remainder of this as x - (floor(sqrt(x)))^2.

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Integer_square_root">Integer square root</a>

%t f[n_]:=n-(Floor[Sqrt[n]])^2;lst={};Do[p=Prime[n];If[PrimeQ[f[p]],AppendTo[lst,p]],{n,7!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Feb 25 2010 *)

%o (PARI) { forprime(p=2, 2000, isr = sqrtint(p); Rem = p - isr*isr; if (isprime(Rem), print1(p, ",") ) ) }

%K nonn

%O 1,1

%A _Harry J. Smith_, Dec 07 2007