A380408 a(n) = Sum_{k>=0} floor(n/(2k)!).
0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31, 33, 34, 37, 38, 40, 41, 43, 44, 46, 47, 49, 50, 52, 53, 55, 56, 58, 59, 61, 62, 64, 65, 67, 68, 70, 71, 74, 75, 77, 78, 80, 81, 83, 84, 86, 87, 89, 90, 92, 93, 95, 96, 98, 99, 101, 102, 104, 105, 107
Offset: 0
Keywords
Programs
-
PARI
a(n) = round(sumpos(k=0, n\(2*k)!)); \\ Michel Marcus, Jan 24 2025
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+2) for all n.
Comments