This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A195198 #36 Feb 16 2025 08:33:15 %S A195198 1,1,0,1,1,0,0,0,0,1,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0, %T A195198 0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0, %U A195198 0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0 %N A195198 Characteristic function of squares or three times squares. %C A195198 Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700). %C A195198 A214284 is a similar sequence except with five instead of three. - _Michael Somos_, Oct 22 2017 %H A195198 G. C. Greubel, <a href="/A195198/b195198.txt">Table of n, a(n) for n = 0..1000</a> %H A195198 S. Cooper and M. Hirschhorn, <a href="http://dx.doi.org/10.1216/rmjm/1008959672">On some infinite product identities</a>, Rocky Mountain J. Math., 31 (2001) 131-139. See p. 133 Theorem 3. %H A195198 Michael Somos, <a href="/A010815/a010815.txt">Introduction to Ramanujan theta functions</a> %H A195198 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RamanujanThetaFunctions.html">Ramanujan Theta Functions</a> %F A195198 Euler transform of period 12 sequence [1, -1, 1, 0, 0, -1, 0, 0, 1, -1, 1, -1, ...]. %F A195198 Expansion of psi(q^3) * f(-q^2, -q^10) / f(-q, -q^11) in powers of q where psi(), is a Ramanujan theta function and f(, ) is Ramanujan's general theta function. %F A195198 Multiplicative with a(0) = a(3^e) = 1, a(p^e) = 1 if e even, 0 otherwise. %F A195198 G.f.: (theta_3(q) + theta_3(q^3)) / 2 = 1 + (Sum_{k>0} x^(k^2) + x^(3*k^2)). %F A195198 Dirichlet g.f.: zeta(2*s) * (1 + 3^-s). %F A195198 a(n) = A145377(n) unless n=0. a(3*n + 2) = 0. a(2*n + 1) = A127692(n). a(3*n) = a(n). a(3*n + 1) = A089801(n). %F A195198 Sum_{k=0..n} a(k) ~ (1+1/sqrt(3)) * sqrt(n). - _Amiram Eldar_, Sep 14 2023 %e A195198 G.f. = 1 + q + q^3 + q^4 + q^9 + q^12 + q^16 + q^25 + q^27 + q^36 + q^48 + ... %t A195198 a[ n_] := SeriesCoefficient[ Series[ (EllipticTheta[ 3, 0, q] + EllipticTheta[ 3, 0, q^3]) / 2, {q, 0, n}], {q, 0, n}]; %t A195198 a[ n_] := If[ n < 0, 0, Boole[ OddQ [ Length @ Divisors @ n] || OddQ [ Length @ Divisors[3 n]]]]; %t A195198 Table[If[AnyTrue[{Sqrt[n],Sqrt[3n]},IntegerQ],1,0],{n,0,110}] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, May 22 2020 *) %o A195198 (PARI) {a(n) = issquare(n) || issquare(3*n)}; %o A195198 (PARI) {a(n) = if( n<1, n==0, direuler( p=2, n, if( p==3, 1 + X, 1) / (1 - X^2))[n])}; %Y A195198 Cf. A089801, A127692, A145377, A214284. %K A195198 nonn,mult,easy %O A195198 0,1 %A A195198 _Michael Somos_, Sep 11 2011