login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A195198 Characteristic function of squares or three times squares. 4
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
A214284 is a similar sequence except with five instead of three. - Michael Somos, Oct 22 2017
LINKS
S. Cooper and M. Hirschhorn, On some infinite product identities, Rocky Mountain J. Math., 31 (2001) 131-139. See p. 133 Theorem 3.
Eric Weisstein's World of Mathematics, Ramanujan Theta Functions
FORMULA
Euler transform of period 12 sequence [1, -1, 1, 0, 0, -1, 0, 0, 1, -1, 1, -1, ...].
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.
Multiplicative with a(0) = a(3^e) = 1, a(p^e) = 1 if e even, 0 otherwise.
G.f.: (theta_3(q) + theta_3(q^3)) / 2 = 1 + (Sum_{k>0} x^(k^2) + x^(3*k^2)).
Dirichlet g.f.: zeta(2*s) * (1 + 3^-s).
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).
Sum_{k=0..n} a(k) ~ (1+1/sqrt(3)) * sqrt(n). - Amiram Eldar, Sep 14 2023
EXAMPLE
G.f. = 1 + q + q^3 + q^4 + q^9 + q^12 + q^16 + q^25 + q^27 + q^36 + q^48 + ...
MATHEMATICA
a[ n_] := SeriesCoefficient[ Series[ (EllipticTheta[ 3, 0, q] + EllipticTheta[ 3, 0, q^3]) / 2, {q, 0, n}], {q, 0, n}];
a[ n_] := If[ n < 0, 0, Boole[ OddQ [ Length @ Divisors @ n] || OddQ [ Length @ Divisors[3 n]]]];
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 *)
PROG
(PARI) {a(n) = issquare(n) || issquare(3*n)};
(PARI) {a(n) = if( n<1, n==0, direuler( p=2, n, if( p==3, 1 + X, 1) / (1 - X^2))[n])};
CROSSREFS
Sequence in context: A329677 A077050 A128432 * A039966 A089451 A145099
KEYWORD
nonn,mult,easy
AUTHOR
Michael Somos, Sep 11 2011
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 9 23:14 EDT 2024. Contains 372354 sequences. (Running on oeis4.)