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

A078141
a(n) = floor(exp(n - gamma)), where gamma is Euler's constant.
0
0, 1, 4, 11, 30, 83, 226, 615, 1673, 4549, 12366, 33616, 91380, 248397, 675213, 1835420, 4989191, 13562027, 36865412, 100210580, 272400600, 740461601, 2012783315, 5471312310, 14872568831, 40427833596, 109894245428
OFFSET
0,3
COMMENTS
For any fixed real value x > 0 let u(1) = 1 and u(n) = u(n-1) - x*sign(u(n-1))/n. Then the series S(x) = Sum_{k>=1} u(k) converges and has value S(x) = x*floor(exp(1/x + gamma - 1)) - x - 1 where gamma = 0.5772... is the Euler gamma constant. Thus for n >= 0 a(n+1) = n*S(1/n) + n + 1.
From Gerhard Kirchner, May 02 2020: (Start)
It is interesting to compare T(x)=exp(x-gamma) and G(x)=[T(x)] with F(x)= index k of the harmonic sequence H(k) such that H(k) is closest to x. More exactly: For H(k-1)<x<=H(k), F(x)=k-1 if x<x1, and F(x)=k if x>=x1, where x1=H(k)-1/(2k) is the point of dicontinuity. Harmonic sequence: H(0)=0 and H(k)=H(k-1)+1/k for k>0 with the asymptotic formula H(k)=log(k)+gamma+1/(2k)-1/(12k^2)+O(1/k^4).
G(x) has a point of dicontinuity x2=x1+1/(12k^2), which can be derived from T(x2)=k and the asymptotic formula. Within the "critical" section x1<x<x2, F(x)=G(x)+1, and F(x)=G(x) outside. No n<=200 lies in a critical section (checked), i.e., F(n)=G(n)=a(n) for n<=200.
What about n>200? Let x1<n<x2 with T(x1)<T(n)<T(x2)=k. T(x1)=T(x2)*exp(-1/(12k^2)), which is asymptotically equal to k-1/(12k). With k=T(x2)=ceiling(T(n)): ceiling(T(n))-T(n)<1/(12*T(n)).
Regarding the difference as a random number between 0 and 1 and considering the exponential increase of T(n), it is unlikely that any n is located in a critical section.
(End)
PROG
(PARI) a(n)=if(n<0, 0, floor(exp(n-Euler)))
CROSSREFS
Sequence in context: A019495 A019496 A021006 * A090327 A183118 A183125
KEYWORD
nonn,easy
AUTHOR
Michael Somos, Nov 20 2002
STATUS
approved