OFFSET
0,3
COMMENTS
FORMULA
a(n) = cosh(1)*n - f(n) where f(n) = Sum_{k>=0} fract(n/(2k)!). Here, fract() is the fractional part. The error term f(n) is unbounded above, and the greatest lower bound is 0 (even excluding n=0). The first values for which f(n) > s for s=1,2,3 are f(13)=1.06005, f(407) = 2.03382, and f(22319) = 3.01669. The error is almost periodic: for large m, f(n) is approximately f(n+(2m)!). If n is odd, f(n) > 1/2. f(n) alternately rises and descends, that is, f(2*n)<f(2*n+1)>f(2*n+2) for all n.
PROG
(PARI) a(n) = round(sumpos(k=0, n\(2*k)!)); \\ Michel Marcus, Jan 24 2025
CROSSREFS
KEYWORD
nonn,new
AUTHOR
Akiva Weinberger, Jan 23 2025
STATUS
approved