A098108 a(n) = 1 if n is an odd square, otherwise 0.
0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0
Examples
G.f. = q + q^9 + q^25 + q^49 + q^81 + q^121 + q^169 + q^225 + q^289 + q^361 + ...
References
- Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 104, [5n].
- J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 102.
- Nathan J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 93, Eq. (34.12).
- E. T. Whittaker and G. N. Watson, A Course of Modern Analysis, Cambridge Univ. Press, 4th ed., 1963, p. 464.
Links
- Antti Karttunen, Table of n, a(n) for n = 0..65025
- Mathematics Stack Exchange, Converting an infinite product to sum; Ramanujan tau function.
- V. Kumar Murty, The Tau of Ramanujan, Slides of a talk given at the Indian Institute of Science Education and Research, Bhopal, India, Oct 10, 2011. See slide 63/95.
- Ken Ono, Sinai Robins and Patrick T. Wahl, On the Representation of Integers as Sums of Triangular Numbers, Aequationes mathematicae, August 1995, Volume 50, Issue 1-2, pp 73-94.
- H. P. F. Swinnerton-Dyer, On l-adic representations and congruences for coefficients of modular forms, pp. 1-55 of Modular Functions of One Variable III (Antwerp 1972), Lect. Notes Math., 350, 1973.
- Eric Weisstein's World of Mathematics, Jacobi Theta Functions.
- Index entries for characteristic functions.
Crossrefs
Programs
-
Maple
add(x^((m+1/2)^2),m=-10..10); # alternative A098108 := proc(n) if issqr(n) and type(n,'odd') then 1; else 0 ; end if; end proc: seq(A098108(n),n=0..30) ; # R. J. Mathar, Feb 22 2021
-
Mathematica
Table[If[OddQ@ n && IntegerQ@ Sqrt[n], 1, 0], {n, 0, 120}] (* Michael De Vlieger, Mar 08 2015 *) Array[Boole@ OddQ@ RamanujanTau@ # &, 120] (* Michael De Vlieger, Aug 27 2017 *)
-
PARI
{a(n) = n%2 && issquare( n)}; /* Michael Somos, Jun 08 2012 */
-
PARI
A126811(n) = (ramanujantau(n)%2); \\ Antti Karttunen, Aug 27 2017
Formula
Multiplicative with a(p^e) = 1 if 2 divides e and p > 2, 0 otherwise. - Mitch Harris, Jun 09 2005
Dirichlet g.f.: zeta(2*s)*(1-2^(-2*s)). - R. J. Mathar, Mar 10 2011
G.f.: theta_2( 0, q^4) / 2. - Michael Somos, Jun 08 2012
Euler transform of period 16 sequence [ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -1, ...]. - Michael Somos, Jun 08 2012
a(8*n + 1) = A010054(n). a(n) = 0 unless n == 1 (mod 8). - Michael Somos, Jun 08 2012
For n > 0, a(n) = floor( (sqrt(n)+1)/2 ) - floor( (sqrt(n-1)+1)/2 ). - Mikael Aaltonen, Mar 08 2015
G.f.: eta quotient eta(16*tau)^2/eta(8*tau) = q*Product_{n>=1} (1-q^(16*n))^2 / Product_{n>=1} (1-q^(8*n)), with q = exp(2*Pi*I*z), Im(z) > 0. See the Ono et al. reference, p. 4. - Wolfdieter Lang, Jan 11 2017
Sum_{k=1..n} a(k) ~ sqrt(n)/2. - Amiram Eldar, Oct 28 2023
Comments