login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Let f(n) = exp(Pi*sqrt(n)); sequence gives numbers n such that ceiling(f(n))-f(n) < 1/10.
1

%I #9 Sep 08 2022 08:45:29

%S 6,7,13,17,18,22,25,27,28,31,37,43,58,59,67,74,84,88,94,125,127,129,

%T 136,149,162,163,174,177,183,213,217,232,240,247,267,273,279,282,295,

%U 301,304,307,321,322,326,333,337,352,355,357,365,385,386,388,389,396,439

%N Let f(n) = exp(Pi*sqrt(n)); sequence gives numbers n such that ceiling(f(n))-f(n) < 1/10.

%H G. C. Greubel, <a href="/A127020/b127020.txt">Table of n, a(n) for n = 1..10000</a>

%t a = {}; Do[If[(1 - (Exp[Pi Sqrt[x]] - Floor[Exp[Pi Sqrt[x]]]) > 0) && (1 - ( Exp[Pi Sqrt[x]] - Floor[Exp[Pi Sqrt[x]]])< 10^(-1)), AppendTo[a, x]], {x, 1, 1000}]; a

%t epQ[n_]:=Module[{c=Exp[Pi Sqrt[n]]},Ceiling[c]-c<1/10]; Select[ Range[ 500], epQ] (* _Harvey P. Dale_, May 10 2015 *)

%o (PARI) default(realprecision, 500); c(n) = exp(Pi*sqrt(n));

%o for(n=1, 500, if( ceil(c(n)) - c(n) <1/10, print1(n", "))) \\ _G. C. Greubel_, May 31 2019

%o (Magma) SetDefaultRealField(RealField(500)); R:= RealField(); [n: n in [1..500] | Ceiling(Exp(Pi(R)*Sqrt(n))) - Exp(Pi(R)*Sqrt(n)) lt 1/10]; // _G. C. Greubel_, May 31 2019

%Y Cf. A035484, A127022, A127023, A127024, A127025.

%K nonn

%O 1,1

%A _Artur Jasinski_, Jan 03 2007