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”).

A127020
Let f(n) = exp(Pi*sqrt(n)); sequence gives numbers n such that ceiling(f(n))-f(n) < 1/10.
1
6, 7, 13, 17, 18, 22, 25, 27, 28, 31, 37, 43, 58, 59, 67, 74, 84, 88, 94, 125, 127, 129, 136, 149, 162, 163, 174, 177, 183, 213, 217, 232, 240, 247, 267, 273, 279, 282, 295, 301, 304, 307, 321, 322, 326, 333, 337, 352, 355, 357, 365, 385, 386, 388, 389, 396, 439
OFFSET
1,1
LINKS
MATHEMATICA
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
epQ[n_]:=Module[{c=Exp[Pi Sqrt[n]]}, Ceiling[c]-c<1/10]; Select[ Range[ 500], epQ] (* Harvey P. Dale, May 10 2015 *)
PROG
(PARI) default(realprecision, 500); c(n) = exp(Pi*sqrt(n));
for(n=1, 500, if( ceil(c(n)) - c(n) <1/10, print1(n", "))) \\ G. C. Greubel, May 31 2019
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Artur Jasinski, Jan 03 2007
STATUS
approved