login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A005369 a(n) = 1 if n is of form m(m+1), else 0. 13
1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 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, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

This is essentially the q-expansion of the Jacobi theta function theta_2(q). (In theta_2 one has to ignore the initial factor of 2*q^(1/4). See also A010054.) - N. J. A. Sloane, Aug 03 2014

REFERENCES

S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..10000

Robert Price, Comments on A005369 concerning Elementary Cellular Automata, Jan 29 2016

Eric Weisstein's World of Mathematics, Jacobi Theta Functions [From Franklin T. Adams-Watters, Jun 29 2009]

Eric Weisstein's World of Mathematics, Elementary Cellular Automaton

S. Wolfram, A New Kind of Science

Index entries for sequences related to cellular automata

Index to Elementary Cellular Automata

Index entries for characteristic functions

FORMULA

Expansion of q^(-1/4) * eta(q^4)^2 / eta(q^2) in powers of q.

Euler transform of period 4 sequence [ 0, 1, 0, -1, ...].

G.f.: Product_{k>0} (1 - x^(4*k)) / (1 - x^(4*k-2)) = f(x^2, x^6) where f(, ) is Ramanujan's general theta function.

Given g.f. A(x), then B(q) = (q*A(q^4))^2 satisfies 0 = f(B(q), B(q^2), B(q^4)) where f(u, v, w) = v^3 + 4*v*w^2 - u^2*w. - Michael Somos, Apr 13 2005

Given g.f. A(x), then B(q) = q*A(q^4) satisfies 0 = f(B(q), B(q^2), B(q^3), B(q^6)) where f(u1, u2, u3, u6) = u1*u2^2*u6 - u1*u6^3 - u3^3*u2. - Michael Somos, Apr 13 2005

a(n) = b(4*n + 1) where b() is multiplicative and b(2^e) = 0^e, b(p^e) = (1 + (-1)^e)/2 if p>2. - Michael Somos, Jun 06 2005

G.f.: 1/2 x^{-1/4}theta_2(0,x), where theta_2 is a Jacobi theta function. - Franklin T. Adams-Watters, Jun 29 2009

a(A002378(n)) = 1; a(A078358(n)) = 0. - Reinhard Zumkeller, Jul 05 2014

a(n) = floor(sqrt(n+1)+1/2)-floor(sqrt(n)+1/2). - Mikael Aaltonen, Jan 02 2015

a(2*n) = A010054(n).

a(n) = A000729(n)(mod 2). - John M. Campbell, Jul 16 2016

EXAMPLE

G.f. = 1 + x^2 + x^6 + x^12 + x^20 + x^30 + x^42 + x^56 + x^72 + x^90 + ...

G.f. = q + q^9 + q^25 + q^49 + q^81 + q^121 + q^169 + q^225 + q^289 + ...

MATHEMATICA

a005369[n_] := If[IntegerQ[Sqrt[4 # + 1]], 1, 0] & /@ Range[0, n]; a005369[100] (* Michael De Vlieger, Jan 02 2015 *)

a[ n_] := SquaresR[ 1, 4 n + 1] / 2; (* Michael Somos, Feb 22 2015 *)

a[ n_] := SeriesCoefficient[ EllipticTheta[ 2, 0, x] / (2 x^(1/4)), {x, 0, n}]; (* Michael Somos, Feb 22 2015 *)

QP = QPochhammer; s = QP[q^4]^2/QP[q^2] + O[q]^100; CoefficientList[s, q] (* Jean-Fran├žois Alcover, Dec 01 2015, adapted from PARI *)

PROG

(PARI) {a(n) = if( n<0, 0, issquare(4*n + 1))};

(PARI) {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^4 + A)^2 / eta(x^2 + A), n))};

(Haskell)

a005369 = a010052 . (+ 1) . (* 4) -- Reinhard Zumkeller, Jul 05 2014

CROSSREFS

Cf. A002378. Partial sums give A000194.

Cf. A010052, A010054, A016813, A240025.

Sequence in context: A225569 A087032 A102242 * A108340 A088917 A014933

Adjacent sequences:  A005366 A005367 A005368 * A005370 A005371 A005372

KEYWORD

nonn

AUTHOR

N. J. A. Sloane

EXTENSIONS

Additional comments from Michael Somos, Apr 29 2003

Erroneous formula removed by Reinhard Zumkeller, Jul 05 2014

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified February 18 02:20 EST 2018. Contains 299297 sequences. (Running on oeis4.)