# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/
Search: id:a035185
Showing 1-1 of 1
%I A035185 #40 Oct 11 2022 07:59:19
%S A035185 1,1,0,1,0,0,2,1,1,0,0,0,0,2,0,1,2,1,0,0,0,0,2,0,1,0,0,2,0,0,2,1,0,2,
%T A035185 0,1,0,0,0,0,2,0,0,0,0,2,2,0,3,1,0,0,0,0,0,2,0,0,0,0,0,2,2,1,0,0,0,2,
%U A035185 0,0,2,1,2,0,0,0,0,0,2,0,1,2,0,0,0,0,0,0,2,0,0,2,0,2,0,0,2,3,0,1,0,0,2,0,0
%N A035185 Number of divisors of n == 1 or 7 (mod 8) minus number of divisors of n == 3 or 5 (mod 8).
%C A035185 Coefficients in expansion of Dirichlet series Product_p (1-(Kronecker(m,p)+1)*p^(-s) + Kronecker(m,p)*p^(-2s))^(-1) for m = 2.
%C A035185 Let zetaQ(sqrt(2))(s) = Sum (1/(Z(sqrt(2)):A)^s), a Dedekind zeta function, where A runs through the nonzero ideals of Z(sqrt(2)) and where (Z(sqrt(2)):A) is the norm of A; then zetaQ(sqrt(2))(s) = Sum_{n>=1}, a(n)/n^s); Sum{k=1..n} a(k) is asymptotic to c*n where c = log(1 + sqrt(2))/sqrt(2). - _Benoit Cloitre_, Jan 01 2003
%C A035185 Inverse Moebius transform of A091337.
%C A035185 a(n) is the number of solutions to the equation n = x^2 - 2*y^2 in integers where -x < 2*y <= x. [Uspensky and Heaslet] - _Michael Somos_, Feb 17 2020
%C A035185 Coefficients of Dedekind zeta function for the quadratic number field of discriminant 8. See A002324 for formula and Maple code. - _N. J. A. Sloane_, Mar 22 2022
%D A035185 J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 368.
%H A035185 G. C. Greubel, Table of n, a(n) for n = 1..10000
%H A035185 M. Baake and R. V. Moody, Similarity submodules and root systems in four dimensions, arXiv:math/9904028 [math.MG], 1999.
%H A035185 M. Baake and R. V. Moody, Similarity submodules and root systems in four dimensions, Canad. J. Math. 51 (1999), 1258-1276.
%F A035185 G.f.: Sum_{k>0} x^k * (1 - x^(2*k)) / (1 + x^(4*k)).
%F A035185 -(-1)^(n*(n-1)/2)*a(n) = Sum_{n >= 1} (-1)^n * q^(n*(n+1)/2)*(1-q)*(1-q^2)*...*(1-q^(n-1))/ ((1+q)*(1+q^2)*...*(1+q^n)). - _Jeremy Lovejoy_, Jun 12 2009
%F A035185 a(n) = (-1)^floor(n/2) * A259829(n). - _Michael Somos_, Jul 06 2015
%F A035185 a(n) is multiplicative with a(2^e) = 1, a(p^e) = (1 + (-1)^e) / 2 if p == 3, 5 (mod 8), a(p^e) = e + 1 if p == 1, 7 (mod 8). - _Jianing Song_, Sep 07 2018
%F A035185 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = log(sqrt(2)+1)/sqrt(2) = A091648/A002193 = 0.623225... . - _Amiram Eldar_, Oct 11 2022
%e A035185 G.f. = x + x^2 + x^4 + 2*x^7 + x^8 + x^9 + 2*x^14 + x^16 + 2*x^17 + x^18 + ...
%e A035185 a(7) = 2 because 7 = 3^2 - 2*(+1)^2 = 3^2 - 2*(-1)^2. - _Michael Somos_, Feb 17 2020
%t A035185 a[ n_] := If[ n < 1, 0, DivisorSum[ n, KroneckerSymbol[ 2, #] &]]; (* _Michael Somos_, Jul 06 2015 *)
%t A035185 a[ n_] := SeriesCoefficient[ Sum[ x^k (1 - x^(2 k)) / (1 + x^(4 k)), {k, n}], {x, 0, n}]; (* _Michael Somos_, Jul 06 2015 *)
%t A035185 a[ n_] := If[ n < 1, 0, Times @@ (Which[ # <= 2, 1, Mod[#, 8] > 1 && Mod[#, 8] < 7, 1 - Mod[#2, 2], True, #2 + 1] & @@@ FactorInteger @ n)]; (* _Michael Somos_, Jul 06 2015 *)
%o A035185 (PARI) {a(n) = if( n<1, 0, sumdiv(n, d, kronecker(2, d)))};
%o A035185 (PARI) {a(n) = if( n<1, 0, direuler(p=2, n, 1 / ((1 - X) * (1 - kronecker(2, p)*X)))[n])};
%o A035185 (PARI) {a(n) = my(A, p, e); if( n<1, 0, A = factor(n); prod(k=1, matsize(A)[1], [p, e] = A[k, ]; if(p==2, 1, p%8>1 && p%8<7, !(e%2), e+1)))}; \\ _Michael Somos_, Aug 17 2006
%o A035185 (PARI) {a(n) = if( n<1, 0, polcoeff( sum(k=1, n, x^k * (1 - x^(2*k)) / (1 + x^(4*k)), x * O(x^n)), n))}; \\ _Michael Somos_, Jul 06 2015
%Y A035185 Cf. A035251, A078462, A188169, A188170, A188171, A188172, A259829.
%Y A035185 Cf. A002193, A091648.
%Y A035185 Moebius transform gives A091337.
%Y A035185 Dedekind zeta functions for imaginary quadratic number fields of discriminants -3, -4, -7, -8, -11, -15, -19, -20 are A002324, A002654, A035182, A002325, A035179, A035175, A035171, A035170, respectively.
%Y A035185 Dedekind zeta functions for real quadratic number fields of discriminants 5, 8, 12, 13, 17, 21, 24, 28, 29, 33, 37, 40 are A035187, A035185, A035194, A035195, A035199, A035203, A035188, A035210, A035211, A035215, A035219, A035192, respectively.
%K A035185 nonn,mult
%O A035185 1,7
%A A035185 _N. J. A. Sloane_
# Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE