login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A005369 a(n) = 1 if n is of the form m(m+1), else 0. 15
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

For n > 0, a(n) is the number of partitions of n into two parts such that the larger part is equal to the square of the smaller part. - Wesley Ivan Hurt, Dec 23 2020

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() = A098108() 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

For n > 0, a(n) = Sum_{k=1..floor(n/2)} [k^2 = n-k], where [ ] is the Iverson bracket. - Wesley Ivan Hurt, Dec 23 2020

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 + ...

MAPLE

A005369 := proc(n)

    if issqr(1+4*n) then

        if type( sqrt(1+4*n)-1, 'even') then

            1;

        else

            0;

        end if;

    else

        0;

    end if;

end proc:

seq(A005369(n), n=0..80) ; # R. J. Mathar, Feb 22 2021

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 *)

nmax = 200; CoefficientList[Series[Sum[x^(k*(k + 1)), {k, 0, Sqrt[nmax]}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Nov 12 2020 *)

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: A190224 A321692 A102242 * A278169 A262693 A267423

Adjacent sequences:  A005366 A005367 A005368 * A005370 A005371 A005372

KEYWORD

nonn,easy

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 10 16:16 EDT 2021. Contains 342845 sequences. (Running on oeis4.)