login
Primes p such that floor(sqrt(2)) + floor(sqrt(3)) + floor(sqrt(5)) + ... + floor(sqrt(p)) is prime.
2

%I #22 Sep 08 2022 08:46:04

%S 3,29,61,73,127,181,229,251,281,313,367,487,503,509,547,587,599,601,

%T 613,617,659,727,739,751,797,809,829,863,881,983,1033,1061,1087,1103,

%U 1153,1163,1223,1277,1381,1861,1871,2039,2063,2099,2113,2131,2203,2221

%N Primes p such that floor(sqrt(2)) + floor(sqrt(3)) + floor(sqrt(5)) + ... + floor(sqrt(p)) is prime.

%H Amiram Eldar, <a href="/A220953/b220953.txt">Table of n, a(n) for n = 1..10000</a>

%t ps = Prime[Range[1000]]; t = {}; s = 0; Do[s = s + Floor[Sqrt[p]]; If[PrimeQ[s], AppendTo[t, p]], {p, ps}]; t (* _T. D. Noe_, Feb 21 2013 *)

%o (PARI) s=0;forprime(p=2,1e4,if(isprime(s+=sqrtint(p)),print1(p", "))) \\ _Charles R Greathouse IV_, Feb 21 2013

%o (Magma) [NthPrime(i): i in [1..400] | IsPrime(S) where S is &+[Floor(Sqrt(NthPrime(k))): k in [1..i]]]; // _Bruno Berselli_, Feb 21 2013

%Y Cf. A062048.

%K nonn

%O 1,1

%A _Daniel J. Hardisky_, Feb 20 2013