login
A380408
a(n) = Sum_{k>=0} floor(n/(2k)!).
0
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,3
COMMENTS
Partial sum of A060832 except for the first term in the sum.
Congruent to A034968(n) mod 2. Therefore, the parity of a(n) is the parity of the n-th permutation of k elements (k>=n) in lexicographic order.
For even n, a(n) equals A059563(n/2) whenever cosh(1)*n - a(n) < 1. The first time this fails is n=70, as a(70)=107 but A059563(35)=108. For small n, such failures appear to be very rare; however, the asymptotic density of these failures approaches 1.
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