A334163 Primes p whose continued fraction expansion of sqrt(p) has a 1 in the second position.
3, 7, 13, 23, 31, 43, 47, 59, 61, 73, 79, 97, 113, 137, 139, 157, 163, 167, 191, 193, 211, 223, 241, 251, 277, 281, 283, 307, 311, 313, 317, 347, 349, 353, 359, 383, 389, 397, 421, 431, 433, 439, 463, 467, 479, 509, 521, 523, 557, 563, 569, 571, 601, 607, 613, 617, 619
Offset: 1
Keywords
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
3,seq(op(select(isprime, [$(t^2+t+1)..(t^2+2*t-1)])),t=1..31); # Robert Israel, Apr 20 2020
-
Mathematica
Select[Range[1000], PrimeQ[#] && ContinuedFraction[Sqrt[#]][[2,1]] == 1 &] (* Amiram Eldar, Apr 17 2020 *) Select[Prime[Range[150]],ContinuedFraction[Sqrt[#]][[2,1]]==1&] (* Harvey P. Dale, Mar 04 2022 *)
-
PARI
isok(p) = isprime(p) && contfrac(sqrt(p))[2] == 1;
Comments