Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #15 Jan 22 2024 00:13:27
%S 1,1,-1,1,0,-1,0,1,1,0,0,-1,0,0,0,1,0,1,0,0,0,0,0,-1,1,0,-1,0,0,0,0,1,
%T 0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,-1,1,1,0,0,0,-1,0,0,0,0,0,0,0,0,0,1,0,
%U 0,0,0,0,0,0,1,0,0,-1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,1,0,1
%N Expansion of (phi(q) + phi(q^2) - phi(q^3) - phi(q^6)) / 2 in powers of q where phi() is a Ramanujan theta function.
%H Antti Karttunen, <a href="/A244611/b244611.txt">Table of n, a(n) for n = 1..65537</a>
%H Michael Somos, <a href="/A010815/a010815.txt">Introduction to Ramanujan theta functions</a>.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/RamanujanThetaFunctions.html">Ramanujan Theta Functions</a>.
%F Multiplicative with a(2^e) = 1, a(3^e) = (-1)^e, and a(p^e) = (1 + (-1)^e) / 2 if p>3.
%F G.f.: (theta_3(q) + theta_3(q^2) - theta_3(q^3) - theta_3(q^6)) / 2.
%F a(2*n) = a(n). a(2*n + 1) = A214505(n). a(3*n) = -a(n). a(3*n + 1) = A089801(n). a(6*n + 5) = 0.
%F From _Amiram Eldar_, Sep 12 2023: (Start)
%F Dirichlet g.f.: (1 + 1/2^s) * (1 - 1/3^s) * zeta(2*s).
%F Sum_{k=1..n} a(k) ~ c * sqrt(n), where c = 1 + 1/sqrt(2) - 1/sqrt(3) - 1/sqrt(6) = 0.721508... . (End)
%e G.f. = q + q^2 - q^3 + q^4 - q^6 + q^8 + q^9 - q^12 + q^16 + q^18 + ...
%o (PARI) {a(n) = issquare(n) + issquare(2*n) - issquare(3*n) - issquare(6*n)};
%o (PARI) {a(n) = if( n<1, 0, n/= 2^valuation(n, 2); issquare(n) - issquare(n*3))};
%o (PARI) {a(n) = local(A); if( n<1, 0, A = factor(n); prod( k=1, matsize(A)[1], if( p=A[k,1], e=A[k,2]; if( p==2, 1, if( p==3, (-1)^e, !(e%2))))))};
%o (Scheme)
%o ;; Based on the given multiplicative formula, and using the memoization-macro definec:
%o (definec (A244611 n) (cond ((= 1 n) n) ((even? n) (A244611 (A000265 n))) ((zero? (modulo n 3)) (* (expt -1 (A067029 n)) (A244611 (A028234 n)))) (else (* 1/2 (+ 1 (expt -1 (A067029 n))) (A244611 (A028234 n))))))
%o ;; _Antti Karttunen_, Dec 07 2017
%Y Cf. A089801, A214505.
%K sign,easy,mult
%O 1,1
%A _Michael Somos_, Jul 01 2014
%E More terms from _Antti Karttunen_, Dec 07 2017