A092149 Partial sums of A092673.
1, -1, -2, -1, -2, 0, -1, -1, -1, 1, 0, -1, -2, 0, 1, 1, 0, 0, -1, -2, -1, 1, 0, 0, 0, 2, 2, 1, 0, -2, -3, -3, -2, 0, 1, 1, 0, 2, 3, 3, 2, 0, -1, -2, -2, 0, -1, -1, -1, -1, 0, -1, -2, -2, -1, -1, 0, 2, 1, 2, 1, 3, 3, 3, 4, 2, 1, 0, 1, -1, -2, -2, -3, -1, -1, -2, -1, -3, -4, -4, -4, -2, -3, -2, -1, 1, 2, 2, 1, 1, 2, 1, 2, 4, 5, 5, 4, 4, 4, 4, 3, 1, 0, 0, -1, 1
Offset: 1
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Accumulate@ Array[MoebiusMu[#] - If[OddQ@ #, 0, MoebiusMu[#/2]] &, 106] (* Michael De Vlieger, Mar 31 2021 *)
-
PARI
a(n)=my(s);forstep(k=bitor(n\4+1,1),n\2,2,s-=moebius(k));forstep(k=bitor(n\2+1,1),n,2,s+=moebius(k)); s \\ Charles R Greathouse IV, Feb 07 2013
-
Python
from functools import lru_cache @lru_cache(maxsize=None) def A092149(n): if n == 1: return 1 c, j = n+1, 2 k1 = n//j while k1 > 1: j2 = n//k1 + 1 c += (j2-j)*A092149(k1) j, k1 = j2, n//j2 return j-c # Chai Wah Wu, Mar 31 2021
Formula
G.f. Sum_{n >= 1} a(n)*(x^n)/((1-x^n)*(x^(n+1)-1))*x = -(x^2) and -1/x. [Mats Granvik, Oct 11 2010]
On the Riemann hypothesis, |a(n)| = O(n^(1/2+e)) for any e > 0. - Charles R Greathouse IV, Feb 07 2013
a(1)=1, then for n>=2, Sum_{k=1..n} a(floor(n/k)) = 0. - Benoit Cloitre, Feb 21 2013
G.f. A(x) satisfies x * (1 - x) = Sum_{k>=1} (1 - x^k) * A(x^k). - Seiichi Manyama, Mar 31 2023