This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A184774 #35 Aug 19 2025 21:05:45 %S A184774 2,5,7,11,19,29,31,41,43,53,59,67,73,79,83,89,97,101,103,107,113,127, %T A184774 131,137,149,151,173,179,181,193,197,199,223,227,229,233,239,241,251, %U A184774 257,263,271,277,281,311,313,337,347,349,353,359,367,373,379,383,397 %N A184774 Primes of the form floor(k*sqrt(2)). %C A184774 Let N={1,2,...}, L={floor(n*sqrt(2)): n in N} and U={2n+L(n): n in N}. Every prime is in L or U, since the union of the (disjoint) sets L and U is N. %C A184774 The conjecture formerly posted here, that "if r is an irrational number and 1<r<2, then there are infinitely many primes in the set L={floor(n*r)}," is proved in I. M. Vinogradov, The Method of Trigonometrical Sums in the Theory of Numbers, (1954), page 180. %C A184774 Note that every prime not in L is in U={floor(n*s)}, where s=r/(r-1). That is, Beatty sequences partition the primes into two infinite classes. %C A184774 The conjecture generalized: if r is a positive irrational number and h is a real number, then each of the sets {floor(n*r+h)}, {round(n*r+h)}, and {ceiling(n*r+h)} contains infinitely many primes. Can the method in Vinogradov be extended to cover these cases? %C A184774 [Update regarding the conjecture from _Clark Kimberling_, Jan 03 2011.] %H A184774 Charles R Greathouse IV, <a href="/A184774/b184774.txt">Table of n, a(n) for n = 1..10000</a> %F A184774 a(n) ~ sqrt(2)*n log n. - _Charles R Greathouse IV_, Apr 29 2015 %e A184774 The sequence L(n)=floor(n*sqrt(2)) begins with 1, 2, 4, 5, 7, 8, 9, 11, 12, 14, 15, 16, 18, 19,..., which includes primes L(2)=2, L(4)=5, L(5)=7,... %t A184774 r=2^(1/2); s=r/(r-1); %t A184774 a[n_]:=Floor [n*r]; (* A001951 *) %t A184774 b[n_]:=Floor [n*s]; (* A001952 *) %t A184774 Table[a[n],{n,1,120}] %t A184774 t1={}; Do[If[PrimeQ[a[n]], AppendTo[t1,a[n]]], {n,1,600}]; t1 %t A184774 t2={}; Do[If[PrimeQ[a[n]], AppendTo[t2,n]], {n,1,600}]; t2 %t A184774 t3={}; Do[If[MemberQ[t1, Prime[n]], AppendTo[t3,n]],{n,1,300}]; t3 %t A184774 t4={}; Do[If[PrimeQ[b[n]], AppendTo[t4,b[n]]],{n,1,600}]; t4 %t A184774 t5={}; Do[If[PrimeQ[b[n]], AppendTo[t5,n]],{n,1,600}]; t5 %t A184774 t6={}; Do[If[MemberQ[t4, Prime[n]], AppendTo[t6,n]],{n,1,300}]; t6 %t A184774 (* the lists t1,t2,t3,t4,t5,t6 match the sequences %t A184774 A184774, A184775, A184776, A184777, A184778, A184779 *) %t A184774 Select[Floor[Range[500]Sqrt[2]],PrimeQ] (* _Harvey P. Dale_, Jan 05 2019 *) %o A184774 (PARI) is(n)=my(k=sqrtint(n^2\2)+1); sqrtint(2*k^2)==n && isprime(n) \\ _Charles R Greathouse IV_, Apr 29 2015 %o A184774 (Magma) [Floor(n*Sqrt(2)): n in [1..400] | IsPrime(Floor(n*Sqrt(2)))]; // _Vincenzo Librandi_, Apr 30 2015 %o A184774 (Python) %o A184774 from math import isqrt %o A184774 from itertools import count, islice %o A184774 from sympy import isprime %o A184774 def A184774_gen(): # generator of terms %o A184774 return filter(isprime,(isqrt(k**2<<1) for k in count(1))) %o A184774 A184774_list = list(islice(A184774_gen(),25)) # _Chai Wah Wu_, Jul 28 2022 %Y A184774 Cf. A001951 (Beatty sequence of sqrt(2)), A001952 (Beatty sequence of 2+sqrt(2)), A184775, A184776, A184777, A184778, A184779. %K A184774 nonn,easy %O A184774 1,1 %A A184774 _Clark Kimberling_, Jan 21 2011