A382692 a(n) = floor of alternating sum of k-th roots of n, with k >= 2.
0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6
Offset: 0
Keywords
Examples
a(15) = floor(15^(1/2) - 15^(1/3) + 15^(1/4) - ...) = floor(1.9701...) = 1.
Crossrefs
Programs
-
Mathematica
Floor@Table[NSum[n^(1/(2 k)) - n^(1/(2 k + 1)), {k, 1, Infinity}, WorkingPrecision -> 30], {n, 1, 100}]
Formula
a(n) = floor(Sum_{k>=2} (-1)^k * n^(1/k)) = floor(Sum_{k>=1} (n^(1/(2*k)) - n^(1/(2*k + 1)))).
a(n) ~ A381042(n).
Series expansion of Sum_{k>=2} (-1)^k * x^(1/k) at x=1: Sum_{i>=0} A(i) * (x-1)^i/i!, where A(i) = KroneckerDelta(i, 1) - Sum_{j=1..i} eta(j) * StirlingS1(i, j), with eta as the Dirichlet eta function.