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 A184778 #20 Jul 29 2022 09:56:31 %S A184778 1,4,5,7,11,14,18,21,32,41,46,48,49,56,62,79,83,86,90,93,97,114,120, %T A184778 123,127,130,134,137,144,165,169,172,178,181,185,188,213,220,222,223, %U A184778 237,243,246,250,253,257,260,267,288,302,308,311,325,329,343,346,352,360,366,369,376 %N A184778 Numbers k such that 2k + floor(k*sqrt(2)) is prime. %H A184778 G. C. Greubel, <a href="/A184778/b184778.txt">Table of n, a(n) for n = 1..10000</a> %e A184778 See A184774. %t A184778 r=2^(1/2); s=r/(r-1); %t A184778 a[n_]:=Floor [n*r]; (* A001951 *) %t A184778 b[n_]:=Floor [n*s]; (* A001952 *) %t A184778 Table[a[n],{n,1,120}] %t A184778 t1={}; Do[If[PrimeQ[a[n]], AppendTo[t1,a[n]]], {n,1,600}]; t1 %t A184778 t2={}; Do[If[PrimeQ[a[n]], AppendTo[t2,n]], {n,1,600}]; t2 %t A184778 t3={}; Do[If[MemberQ[t1, Prime[n]], AppendTo[t3,n]],{n,1,300}]; t3 %t A184778 t4={}; Do[If[PrimeQ[b[n]], AppendTo[t4,b[n]]],{n,1,600}]; t4 %t A184778 t5={}; Do[If[PrimeQ[b[n]], AppendTo[t5,n]],{n,1,600}]; t5 %t A184778 t6={}; Do[If[MemberQ[t4, Prime[n]], AppendTo[t6,n]],{n,1,300}]; t6 %t A184778 (* the lists t1,t2,t3,t4,t5,t6 match the sequences %t A184778 A184774, A184775, A184776 ,A184777, A184778, A184779 *) %o A184778 (PARI) is(n)=isprime(sqrtint(2*n^2)+2*n) \\ _Charles R Greathouse IV_, May 22 2017 %o A184778 (Python) %o A184778 from itertools import count, islice %o A184778 from math import isqrt %o A184778 from sympy import isprime %o A184778 def A184778_gen(): # generator of terms %o A184778 return filter(lambda k:isprime((k<<1)+isqrt(k**2<<1)), count(1)) %o A184778 A184778_list = list(islice(A184778_gen(),25)) # _Chai Wah Wu_, Jul 28 2022 %Y A184778 Cf. A184774, A184777, A184779. %K A184778 nonn %O A184778 1,2 %A A184778 _Clark Kimberling_, Jan 21 2011