login
a(n) = moebius(n) - moebius(n/2) where moebius(n) is zero if n is not an integer.
20

%I #65 Jan 19 2024 04:55:52

%S 1,-2,-1,1,-1,2,-1,0,0,2,-1,-1,-1,2,1,0,-1,0,-1,-1,1,2,-1,0,0,2,0,-1,

%T -1,-2,-1,0,1,2,1,0,-1,2,1,0,-1,-2,-1,-1,0,2,-1,0,0,0,1,-1,-1,0,1,0,1,

%U 2,-1,1,-1,2,0,0,1,-2,-1,-1,1,-2,-1,0,-1,2,0,-1,1,-2,-1,0,0,2,-1,1,1,2,1,0,-1,0,1,-1,1,2,1,0,-1,0,0,0,-1,-2,-1,0,-1,2

%N a(n) = moebius(n) - moebius(n/2) where moebius(n) is zero if n is not an integer.

%C Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

%C Setting x=1 gives us phi(n) (A000010). Setting x=0 gives A092674.

%C Apparently the Dirichlet inverse of A001511. - _R. J. Mathar_, Dec 22 2010

%C Given A = A115359 as an infinite lower triangular matrix and B = the Mobius sequence as a vector, A092673 = A*B. - _Gary W. Adamson_, Mar 14 2011

%C Empirical: Letting M(n) denote the n X n matrix whereby the (i,j)-entry of M(n) is Sum_{k=1..j} floor(i/k), we have that a(n) is the (n,1)-entry of the inverse of M(n). - _John M. Campbell_, Aug 30 2017

%C John Campbell's statement is proved at the Mathematics Stack Exchange link. - _Sungjin Kim_, Jul 17 2019

%H Robert Israel, <a href="/A092673/b092673.txt">Table of n, a(n) for n = 1..10000</a>

%H Michael Somos, <a href="/A010815/a010815.txt">Introduction to Ramanujan theta functions</a>, 2019.

%H Mathematics Stack Exchange, <a href="https://math.stackexchange.com/questions/2666770/what-is-the-inverse-of-left-sum-k-1j-left-lfloor-fracik-right-rf/2670083#2670083">What is the inverse of ... ?</a>.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/RamanujanThetaFunctions.html">Ramanujan Theta Functions</a>.

%F Let t(n) = binomial(n+1,2); s[1]=x; for i >= 2, s[i] = t(i)-Sum_{j=1..i-1} s[j]*floor(i/j); a(n) = coefficient of x in s[n]. - _Jon Perry_

%F a(n) is multiplicative with a(2)= -2, a(4)= 1, a(2^e)= 0 if e>2. a(p)= -1, a(p^e)= 0 if e>1, p>2. - _Michael Somos_, Mar 26 2007

%F a(8*n)= 0. a(2*n + 1) = moebius(2*n + 1). a(2*n) = moebius(2*n) - moebius(n). - _Michael Somos_, Mar 26 2007

%F |a(n)| <= 2.

%F 1 / (1 + x) = Product_{k>0} f(-x^k)^a(k) where f() is a Ramanujan theta function. - _Michael Somos_, Mar 26 2007

%F Dirichlet g.f.: (1-2^(-s))/zeta(s). - _Ralf Stephan_, Mar 24 2015

%F G.f. A(x) satisfies x * (1 - x) = Sum_{k>=1} A(x^k). - _Seiichi Manyama_, Mar 31 2023

%F Sum_{k=1..n} abs(a(k)) ~ c * n, where c = 9/Pi^2 = 0.9118906... . - _Amiram Eldar_, Jan 19 2024

%e The first few s[n] are:

%e x, -2*x + 3, -x + 3, x + 1, -x + 5, 2*x, -x + 7, 4, 6, 2*x + 2, -x + 11, -x + 5, -x + 13, 2*x + 4, x + 7, 8, -x + 17, 6, -x + 19, -x + 9, x + 11, 2*x + 8, -x + 23, 8, 20, 2*x + 10, 18, -x + 13, -x + 29, -2*x + 10, -x + 31, 16, x + 19.

%e x - 2*x^2 - x^3 + x^4 - x^5 + 2*x^6 - x^7 + 2*x^10 - x^11 +...

%p A092673:= proc(n) if n::odd then numtheory:-mobius(n) else numtheory:-mobius(n) - numtheory:-mobius(n/2) fi end proc:

%p map(A092673, [$1..100]); # _Robert Israel_, Dec 31 2015

%t f[n_] := MoebiusMu[n] - If[OddQ@n, 0, MoebiusMu[n/2]]; Array[f, 105] (* _Robert G. Wilson v_ *)

%o (PARI) s=vector(2000); t(n)=binomial(n+1,2); s[1]=x; for(i=2,2000, s[i]=t(i)-sum(j=1,i-1, s[j]*floor(i/j))); for(i=1,2000,print1(","polcoeff(s[i],1)))

%o (PARI) {a(n) = if( n<1, 0, moebius(n) - if( n%2, 0, moebius(n/2)))} /* _Michael Somos_, Mar 26 2007 */

%o (PARI) {a(n) = local(A, B, m); if( n<1, 0, A = x * O(x^n); B = 1 + x + A; for( k=1, n, B *= eta(x^k + A)^( m = polcoeff(B, k))); m)} /* _Michael Somos_, Mar 26 2007 */

%o (PARI) a(n)=my(o=valuation(n%8,2)); if(o==0, moebius(n), if(o==1, 2*moebius(n), if(o==2, moebius(n/4), 0))) \\ _Charles R Greathouse IV_, Feb 07 2013

%o (Python)

%o from sympy import mobius

%o def A092673(n): return mobius(n)-(0 if n&1 else mobius(n>>1)) # _Chai Wah Wu_, Jul 13 2022

%Y Cf. A008683 (moebius(n)), A092149 (partial sums), A092674, A115359.

%Y Cf. A000010, A000122, A000700, A010054, A092673, A115359, A121373.

%K sign,mult

%O 1,2

%A _Jon Perry_, Mar 02 2004