cp's OEIS Frontend

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.

Showing 1-8 of 8 results.

A036987 Fredholm-Rueppel sequence.

Original entry on oeis.org

1, 1, 0, 1, 0, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Keywords

Comments

Binary representation of the Kempner-Mahler number Sum_{k>=0} 1/2^(2^k) = A007404.
a(n) = (product of digits of n; n in binary notation) mod 2. This sequence is a transformation of the Thue-Morse sequence (A010060), since there exists a function f such that f(sum of digits of n) = (product of digits of n). - Ctibor O. Zizka, Feb 12 2008
a(n-1), n >= 1, the characteristic sequence for powers of 2, A000079, is the unique solution of the following formal product and formal power series identity: Product_{j>=1} (1 + a(j-1)*x^j) = 1 + Sum_{k>=1} x^k = 1/(1-x). The product is therefore Product_{l>=1} (1 + x^(2^l)). Proof. Compare coefficients of x^n and use the binary representation of n. Uniqueness follows from the recurrence relation given for the general case under A147542. - Wolfdieter Lang, Mar 05 2009
a(n) is also the number of orbits of length n for the map x -> 1-cx^2 on [-1,1] at the Feigenbaum critical value c=1.401155... . - Thomas Ward, Apr 08 2009
A054525 (Mobius transform) * A001511 = A036987 = A047999^(-1) * A001511 = the inverse of Sierpiński's gasket * the ruler sequence. - Gary W. Adamson, Oct 26 2009 [Of course this is only vaguely correct depending on how the fuzzy indexing in these formulas is made concrete. - R. J. Mathar, Jun 20 2014]
Characteristic function of A000225. - Reinhard Zumkeller, Mar 06 2012
Also parity of the Catalan numbers A000108. - Omar E. Pol, Jan 17 2012
For n >= 2, also the largest exponent k >= 0 such that n^k in binary notation does not contain both 0 and 1. Unlike for the decimal version of this sequence, A062518, where the terms are only conjectural, for this sequence the values of a(n) can be proved to be the characteristic function of A000225, as follows: n^k will contain both 0 and 1 unless n^k = 2^r-1 for some r. But this is a special case of Catalan's equation x^p = y^q-1, which was proved by Preda Mihăilescu to have no nontrivial solution except 2^3 = 3^2 - 1. - Christopher J. Smyth, Aug 22 2014
Image, under the coding a,b -> 1; c -> 0, of the fixed point, starting with a, of the morphism a -> ab, b -> cb, c -> cc. - Jeffrey Shallit, May 14 2016
Number of nonisomorphic Boolean algebras of order n+1. - Jianing Song, Jan 23 2020

Examples

			G.f. = 1 + x + x^3 + x^7 + x^15 + x^31 + x^63 + x^127 + x^255 + x^511 + ...
a(7) = 1 since 7 = 2^3 - 1, while a(10) = 0 since 10 is not of the form 2^k - 1 for any integer k.
		

Crossrefs

The first row of A073346. Occurs for first time in A073202 as row 6 (and again as row 8).
Congruent to any of the sequences A000108, A007460, A007461, A007463, A007464, A061922, A068068 reduced modulo 2. Characteristic function of A000225.
If interpreted with offset=1 instead of 0 (i.e., a(1)=1, a(2)=1, a(3)=0, a(4)=1, ...) then this is the characteristic function of 2^n (A000079) and as such occurs as the first row of A073265. Also, in that case the INVERT transform will produce A023359.
This is Guy Steele's sequence GS(1, 3), also GS(3, 1) (see A135416).
Cf. A054525, A047999. - Gary W. Adamson, Oct 26 2009

Programs

  • Haskell
    a036987 n = ibp (n+1) where
       ibp 1 = 1
       ibp n = if r > 0 then 0 else ibp n' where (n',r) = divMod n 2
    a036987_list = 1 : f [0,1] where f (x:y:xs) = y : f (x:xs ++ [x,x+y])
    -- Same list generator function as for a091090_list, cf. A091090.
    -- Reinhard Zumkeller, May 19 2015, Apr 13 2013, Mar 13 2013
    
  • Maple
    A036987:= n-> `if`(2^ilog2(n+1) = n+1, 1, 0):
    seq(A036987(n), n=0..128);
  • Mathematica
    RealDigits[ N[ Sum[1/10^(2^n), {n, 0, Infinity}], 110]][[1]]
    (* Recurrence: *)
    t[n_, 1] = 1; t[1, k_] = 1;
    t[n_, k_] := t[n, k] =
      If[n < k, If[n > 1 && k > 1, -Sum[t[k - i, n], {i, 1, n - 1}], 0],
       If[n > 1 && k > 1, Sum[t[n - i, k], {i, 1, k - 1}], 0]];
    Table[t[n, k], {k, n, n}, {n, 104}]
    (* Mats Granvik, Jun 03 2011 *)
    mb2d[n_]:=1 - Module[{n2 = IntegerDigits[n, 2]}, Max[n2] - Min[n2]]; Array[mb2d, 120, 0] (* Vincenzo Librandi, Jul 19 2019 *)
    Table[PadRight[{1},2^k,0],{k,0,7}]//Flatten (* Harvey P. Dale, Apr 23 2022 *)
  • PARI
    {a(n) =( n++) == 2^valuation(n, 2)}; /* Michael Somos, Aug 25 2003 */
    
  • PARI
    a(n) = !bitand(n, n+1); \\ Ruud H.G. van Tol, Apr 05 2023
    
  • Python
    from sympy import catalan
    def a(n): return catalan(n)%2 # Indranil Ghosh, May 25 2017
    
  • Python
    def A036987(n): return int(not(n&(n+1))) # Chai Wah Wu, Jul 06 2022

Formula

1 followed by a string of 2^k - 1 0's. Also a(n)=1 iff n = 2^m - 1.
a(n) = a(floor(n/2)) * (n mod 2) for n>0 with a(0)=1. - Reinhard Zumkeller, Aug 02 2002 [Corrected by Mikhail Kurkov, Jul 16 2019]
Sum_{n>=0} 1/10^(2^n) = 0.110100010000000100000000000000010...
1 if n=0, floor(log_2(n+1)) - floor(log_2(n)) otherwise. G.f.: (1/x) * Sum_{k>=0} x^(2^k) = Sum_{k>=0} x^(2^k-1). - Ralf Stephan, Apr 28 2003
a(n) = 1 - A043545(n). - Michael Somos, Aug 25 2003
a(n) = -Sum_{d|n+1} mu(2*d). - Benoit Cloitre, Oct 24 2003
Dirichlet g.f. for right-shifted sequence: 2^(-s)/(1-2^(-s)).
a(n) = A000108(n) mod 2 = A001405(n) mod 2. - Paul Barry, Nov 22 2004
a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n,k)*Sum_{j=0..k} binomial(k, 2^j-1). - Paul Barry, Jun 01 2006
A000523(n+1) = Sum_{k=1..n} a(k). - Mitch Harris, Jul 22 2011
a(n) = A209229(n+1). - Reinhard Zumkeller, Mar 07 2012
a(n) = Sum_{k=1..n} A191898(n,k)*cos(Pi*(n-1)*(k-1))/n; (conjecture). - Mats Granvik, Mar 04 2013
a(n) = A000035(A000108(n)). - Omar E. Pol, Aug 06 2013
a(n) = 1 iff n=2^k-1 for some k, 0 otherwise. - M. F. Hasler, Jun 20 2014
a(n) = ceiling(log_2(n+2)) - ceiling(log_2(n+1)). - Gionata Neri, Sep 06 2015
From John M. Campbell, Jul 21 2016: (Start)
a(n) = (A000168(n-1) mod 2).
a(n) = (A000531(n+1) mod 2).
a(n) = (A000699(n+1) mod 2).
a(n) = (A000891(n) mod 2).
a(n) = (A000913(n-1) mod 2), for n>1.
a(n) = (A000917(n-1) mod 2), for n>0.
a(n) = (A001142(n) mod 2).
a(n) = (A001246(n) mod 2).
a(n) = (A001246(n) mod 4).
a(n) = (A002057(n-2) mod 2), for n>1.
a(n) = (A002430(n+1) mod 2). (End)
a(n) = 2 - A043529(n). - Antti Karttunen, Nov 19 2017
a(n) = floor(1+log(n+1)/log(2)) - floor(log(2n+1)/log(2)). - Adriano Caroli, Sep 22 2019
This is also the decimal expansion of -Sum_{k>=1} mu(2*k)/(10^k - 1), where mu is the Möbius function (A008683). - Amiram Eldar, Jul 12 2020

Extensions

Edited by M. F. Hasler, Jun 20 2014

A157162 1/Product_{n>=1} (1 - a(n)*x^n) = 1 + Sum_{k>=1} F(k+1)*x^k = 1/(1-x-x^2), where F(n) = A000045(n) (Fibonacci numbers).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 4, 5, 8, 10, 18, 24, 40, 52, 88, 125, 210, 286, 492, 702, 1144, 1638, 2786, 3986, 6704, 9640, 16096, 23964, 39650, 57794, 97108, 144245, 236880, 353010, 589298, 880828, 1459960, 2179068, 3604880, 5471094, 9030450, 13561742, 22542396, 34277634
Offset: 1

Views

Author

Wolfdieter Lang, Aug 10 2009

Keywords

Comments

A formal infinite product representation for the o.g.f. series of the Fibonacci numbers (A000045).
In the context of Witt rings the o.g.f. is called associated unital series for the (infinite dimensional) Witt vector (a(1),a(2),...). Sometimes also called inverse Somos transform, here for the Fibonacci numbers.
1-x-x^2 = product(1 - a(n)*x^n, n=1..infinity).

Examples

			Recurrence I: a(2) = F(3) - a(1)^2 = 1; a(4) = F(5) - (a(1)*a(3) + a(2)^2 +a(1)^2*a(2) + a(1)^4) = 5 - 4 = 1.
Recurrence II (simplified): a(4) = (-(a(1)^4 + 2*a(2)^2) + L(4))/4 = (-3 + 7)/4 = 1.
Recurrence II: a(4)= (-(a(1)^4 + 2*a(2)^2)/4 + 1*1*F(5) - (1/2)*(2*F(2)*F(4)+ 1*F(3)^2) +(1/3)*3*F(2)^2*F(3)-(1/4)*1*F(2)^4 = -3/4 +7/4 = 1.
		

Crossrefs

Cf. A147542 (with the product instead of the reciprocal one).
Cf. A220418.

Programs

  • Mathematica
    a[n_] := a[n] = If[n == 1, 1, (-Sum[d a[d]^(n/d), {d, Most@ Divisors@ n}] + LucasL[n])/n];
    Array[a, 50] (* Jean-François Alcover, Mar 02 2020 *)

Formula

Recurrence I. With P(n,m) the set of partitions of n with m parts:
a(n)= F(n+1) - sum(sum(product(a(j)^e(j),j=1..m), p from P(n,m)), m=2..n), n>=2, with sum(j*e(j),j=1..n)=n, sum(e(j),j=1..n)=m for the partition p of n with m parts. F(n) = A000045(n) (Fibonacci numbers). Input a(1)=F(2)=1. See the array A008284(n,m) for the cardinalities of the sets P(n,m).
Recurrence II (simplified version). With the Lucas numbers L(n)=A000035(n), n>=1, as input (found by V. Jovovic, Mar 10 2009):
a(n) = (- sum(d*a(d)^(n/d), d|n with 1<=d=2, a(1)=1.
Recurrence II. With the number array M0(n,vec(e)) given for any partition in A048996.
a(n) = - sum((d/n)*(a(d))^(n/d),d|n with 1<=d=2; a(1)=F(2)=1. See recurrence 1 for the set P(n,m). The M0 numbers are m!/product(e(j)!,j=1..n).

A147541 Result of using the primes as coefficients in an infinite polynomial series in x and then expressing this series as (1+x)(1+a(1)*x)(1+a(2)*x^2) ... .

Original entry on oeis.org

1, 2, 1, 3, 2, -4, 2, 5, 4, -6, 4, 4, 10, -36, 18, 45, 34, -72, 64, -24, 124, -358, 258, 170, 458, -1260, 916, 148, 1888, -4296, 3690, 887, 7272, -17616, 14718, -5096, 29610, -67164, 58722, -26036, 119602, -244496, 242256, -104754, 487352, -1029384
Offset: 1

Views

Author

Neil Fernandez, Nov 06 2008

Keywords

Comments

This is the PPE (power product expansion) of A036467. - R. J. Mathar, Feb 01 2010

Examples

			From the primes, construct the series 1+2x+3x^2+5x^3+7x^4+... Divide this by (1+x) to get the quotient (1+a(1)x+...), which here gives a(1)=1. Then divide this quotient by (1+a(1)x), i.e. here (1+x), to get (1+a(2)x^2+...), giving a(2)=2.
		

Crossrefs

Programs

  • Maple
    From R. J. Mathar, Feb 01 2010: (Start)
    # Partition n into a set of distinct positive integers, the maximum one
    # being m.
    # Example: partitionsQ(7,5) returns [[2,5],[3,4],[1,2,4]] ;
    # Richard J. Mathar, 2008-11-10
    partitionsQ := proc(n,m)
    local p,t,rec,q;
    p := [] ;
    # take 't' of the n and recursively determine the partitions of
    # what has been left over.
    for t from min(m,n) to 1 by -1 do
    # Since we are only considering partitions into distinct parts,
    # the triangular numbers set a lower bound on the t.
    if t*(t+1)/2 >= n then
    rec := partitionsQ(n-t,t-1) ;
    if nops(rec) = 0 then
    p := [op(p),[t]] ;
    else
    for q in rec do
    p := [op(p),[op(q),t]] ;
    end do:
    end if;
    end if;
    end do:
    RETURN(p) ;
    end proc:
    # Power product expansion of L.
    # L is a list starting with 1, which is considered L[0].
    # Returns the list [a(1),a(2),..] such that
    # product_(i=1,2,..) (1+a(i)x^i) = sum_(j=0,1,2,...) L[j]x^j.
    # Richard J. Mathar, 2008-11-10
    ppe := proc(L)
    local pro,i,par,swithi,snoti,m,p,k ;
    pro := [] ;
    for i from 1 to nops(L)-1 do
    par := partitionsQ(i,i) ;
    swithi := 0 ;
    snoti := 0 ;
    for p in par do
    if i in p then
    m := 1 ;
    for k from 1 to nops(p)-1 do
    m := m*op(op(k,p),pro) ;
    end do;
    swithi := swithi+m ;
    else
    snoti := snoti+mul( op(k,pro),k=p) ;
    end if;
    end do:
    pro := [op(pro), (op(i+1,L)-snoti)/swithi] ;
    end do:
    RETURN(pro) ;
    end proc:
    read("transforms") ;
    A147541 := proc(nmax)
    local L,L1,L2 ;
    L := [1,seq(ithprime(n),n=1..nmax)] ;
    L1 := [seq((-1)^n,n=0..nmax+10)] ;
    A036467 := CONV(L,L1) ;
    ppe(A036467) ;
    end:
    A147541(47) ;
    (End)

Extensions

Extended by R. J. Mathar, Feb 01 2010

A157159 Infinite product representation of series 1 - log(1-x) = 1 + Sum_{j>=1} (j-1)!*(x^j)/j!.

Original entry on oeis.org

1, 1, -1, 10, -16, 126, -526, 10312, -30024, 453840, -2805408, 45779328, -374664720, 7932770496, -67692115440, 2432120198016, -16610113920768, 437275706750208, -5110200130727808, 159305381515284480, -1931470594025607936, 63854116254680514048
Offset: 1

Views

Author

Wolfdieter Lang Mar 06 2009

Keywords

Examples

			Recurrence I: a(7) = 6! - (7*a(1)*a(6) + 21*a(2)*a(5) + 35*a(3)*a(4) + 105*a(1)*a(2)*a(4)) = 720 - (7*126 + 21*(-16) + 35*(-1)*10 + 105*10) = -526.
Recurrence II: a(4) = 3!*(1+2*(-1/2!)^2) + 1 = +10.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=1, 1, (n-1)!*((-1)^n+add(d*
          (-a(d)/d!)^(n/d), d=numtheory[divisors](n) minus {1, n}))
           +(-1)^(n+1)*add((k-1)!*Stirling1(n, k), k=1..n))
        end:
    seq(a(n), n=1..30);  # Alois P. Heinz, Aug 14 2012
  • Mathematica
    a[n_] := a[n] = If[n == 1, 1, (n-1)!*((-1)^n+Sum[d*(-a[d]/d!)^(n/d), {d, Divisors[n][[2 ;; -2]]}])+(-1)^(n+1)*Sum[(k-1)!*StirlingS1[n, k], {k, 1, n}]]; Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Mar 05 2014, after Alois P. Heinz *)

Formula

Definition of a(n): 1-log(1-x) = product(1+a(n)*(x^n)/n!, n=1..infinity) (formal series and product).
Recurrence I. With FP(n,m) the set of partitions of n with m distinct parts (which could be called fermionic partitions (fp)) and the multinomial numbers M1(fp(n,m)) (given as array in A036038 for any partition) for fp(n,m) from FP(n,m): a(n) = (n-1)! - sum(sum(M1(fp)*product(a(k[j]),j=1..m),fp from FP(n,m)), m=2..maxm(n)), with maxm(n):=A003056(n) and the distinct parts k[j], j=1,...,m, of the partition fp of n, n>=3. Inputs a(1)=1, a(2)=1. See the array A008289(n,m) for the cardinality of the set FP(n,m).
Recurrence II: a(n) = (n-1)!*((-1)^n + sum(d*(-a(d)/d!)^(n/d),d|n with 1A089064(n), n>=2, a(1)=1. A089064(n)=sum(((-1)^(m-1))*(m-1)!)*|S1(n,m)|, m=1..n) with the unsigned Stirling numbers of the first kind |A008275|. See the W. Lang link under A147542 for these recurrences.

Extensions

More terms from Alois P. Heinz, Aug 14 2012

A157161 Formal infinite product representation for the Catalan numbers (A000108) o.g.f. series.

Original entry on oeis.org

1, 2, 3, 11, 25, 79, 245, 869, 2692, 9544, 32065, 115381, 400023, 1462730, 5165327, 19165035, 68635477, 255546242, 930138521, 3491772737, 12810761323, 48334512920, 178987624513, 678272753284, 2528210175630, 9616904064021, 36047930953482, 137654448221760, 518401146543811
Offset: 1

Views

Author

Wolfdieter Lang Aug 10 2009

Keywords

Comments

(1-sqrt(1-4*x))/(2*x) = Sum_{k>=0} C(k)*x^k with C(n)=A000108(n) written as formal Product_{n>=1} (1 + a(n)*x^n).

Examples

			Recurrence I: a(4) = C(4) - a(1)*a(3) = 14 - 1*3 = 11.
Recurrence II: a(4)= 2*(-1)^2 + (1*C(4)-(1/2)*(2*C(1)*C(3) + 1*C(2)^2) + (1/3)*3*C(1)^2*C(2)) = 2 + (14 - (10+4)/2 + 2) = 11.
Recurrence II (rewritten): a(4)= (1/4)*(-a(1))^4 + (1/2)*(-a(2))^2 + 7!/4!^2 = 11.
		

Crossrefs

Cf. A147542 (for Fibonacci numbers).

Formula

Product_{n>=1} (1 + a(n)*x^n) = Sum_{k>=1} C(k)*x^k = (1-sqrt(1-4*x))/(2*x), with C(n)= A000108(n) (Catalan numbers).
Recurrence I: With FP(n,m) the set of partitions of n with m distinct parts (which could be called fermionic partitions (fp)):
a(n)= C(n) - sum(sum(product(a(k[j]),j=1..m), fp from FP(n,m)), m=2..maxm(n)), with maxm(n):=A003056(n) and the distinct parts k[j], j=1,...,m, of the partition fp of n, n>=3. Inputs a(1)=C(1)=1, a(2)=C(2)=2. See the array A008289(n,m) for the cardinality of the set FP(n,m).
Recurrence II: With P(n,m) the set of all partitions of n with m parts, and the multinomial numbers M0 (given for every partition under A048996):
a(n) = sum((d/n)*(-a(d)^(n/d)),d|n with 1=2; a(1)=C(1)=1. The exponents e(j)>=0 satisfy sum(j*e(j),j=1..n)=n and sum(e(j),j=1..m). If e_j=0 then part j does not appear. The M0 numbers are m!/product(e(j)!,j=1..n).
Recurrence II (rewritten, thanks to email from V. Jovovic, Mar 10 2009):
a(n)= (sum((d/n)*(-a(d))^(n/d),d|n with 1<=d=2; a(1)=1. Note that n*(2*n-1)!/n!^2 = A001700(n-1)= A088218(n), n>=1, with o.g.f. (d/dx)log(c(x)), where c(x) is the o.g.f. for Catalan numbers A000108. Here no partitions are needed.

A147558 Result of using the Fibonacci numbers as coefficients in an infinite polynomial series in x and then expressing this series as (1+a(1)x)(1+a(2)x^2)(1+a(3)x^3)...

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 8, 8, 14, 18, 29, 40, 68, 88, 174, 210, 344, 492, 852, 1144, 1962, 2786, 4601, 6704, 11240, 16096, 27738, 39650, 64936, 97108, 168408, 236880, 397110, 589298, 979496, 1459960, 2421132, 3604880, 6086790
Offset: 1

Views

Author

Neil Fernandez, Nov 07 2008

Keywords

Examples

			From the Fibonacci numbers, beginning 1,1, construct the series 1+x+x^2+2x^3+3x^4+5x^5+... a(1) is always the coefficient of x, here 1. Divide by (1+a(1)x), i.e. here (1+x), to get the quotient (1+a(2)x^2+...), which here gives a(2)=1. Then divide this quotient by (1+a(2)x^2), i.e. here (1+x^2), to get (1+a(3)x^3+...), giving a(3)=1.
		

Crossrefs

Cf. A147542. [From R. J. Mathar, Mar 12 2009]

Extensions

More terms from R. J. Mathar, Mar 12 2009

A157163 Product_{n>=1} (1 + 2*a(n)*x^n) = Sum_{k>=0} binomial(2*k, k)*x^k = 1/sqrt(1 - 4*x), with the central binomial numbers A000984(n).

Original entry on oeis.org

1, 3, 4, 27, 48, 156, 576, 2955, 7168, 27792, 95232, 352188, 1290240, 5105856, 17743872, 77010795, 252641280, 1000224768, 3616800768, 14484040464, 52102692864, 208963943424, 764877471744, 3025006038012, 11258183024640, 44968060784640, 166308918329344
Offset: 1

Views

Author

Wolfdieter Lang, Aug 10 2009

Keywords

Comments

In the original problem 2*a(n) = [2, 6, 8, 54, 96, 312, 1152, 5910, 14336, 55584, 190464, 704376, ...] appears.

Examples

			Recurrence I: a(4) = binomial(8, 4)/2 - 2*a(1)*a(3) = 35 - 8 = 27.
Recurrence II: a(4) = (1/2)*(1/2)*(-2*a(2))^2 + (1/2)*(1*cbi(4) - (1/2)*(2*cbi(1)*cbi(3) + 1*cbi(2)^2) + (1/3)*3*cbi(1)^2*cbi(2)) = 27.
Recurrence II (rewritten): a(4)= (1/8)*((-2)^4 + 2*(-2*a(2))^2 + (1/2)*4^4) = 27.
		

Crossrefs

Cf. A147542 (Fibonacci), A157161 (Catalan).

Programs

  • Maple
    N:= 100: # for a(1)..a(N)
    S:= convert(series(-ln(1-4*x)/2,x,N+1),polynom):
    for n from 1 to N do
      a[n]:= coeff(S,x,n)/2;
      S:= S - add((-1)^(k-1)*(2*a[n])^k*x^(k*n)/k, k=1..N/n)
    od:
    seq(a[n],n=1..N); # Robert Israel, Jan 03 2019
  • PARI
    a(n) = if (n==1, 1, (1/(2*n))*((-2*a(1))^n + sumdiv(n, d, if ((d!=1) && (d!=n), d*(-2*a(d))^(n/d), 0)) + 4^n/2)); \\ after 2nd Recurrence II; Michel Marcus, Jul 06 2015

Formula

Recurrence I: With FP(n,m) the set of partitions of n with m distinct parts (which could be called fermionic partitions fp):
a(n) = binomial(2*n, n)/2 - Sum_{m=2..maxm(n)} 2^(m-1)*(Sum_{fp from FP(n,m)} (Product_{j=1..m} a(k[j]))), with maxm(n) = A003056(n) and the distinct parts k[j], j = 1..m, of the partition fp of n, n >= 3. Inputs a(1) = 1, a(2) = 3. See the array A008289(n,m) for the cardinality of the set FP(n,m).
Recurrence II: With P(n,m) the set of all partitions of n with m parts, and the multinomial numbers M0 (given for every partition under A048996):
a(n) = (1/2)*Sum_{d|n, 1= 2; a(1) = 1, with cbi(n) = binomial(2*n, n) = A000984(n). The exponents e(j) >= 0 satisfy Sum_{j=1..n} j*e(j) =n and Sum_{j=1..n} e(j) = m. The M0 numbers are m!/(Product_{j=1..n} (e(j))!).
Recurrence II (rewritten, due to email from V. Jovovic, Mar 10 2009):
a(n) = ((-2*a(1))^n + Sum_{d|n, 1

A342223 Product_{n>=1} 1 + a(n)*x^n = Sum_{n=-oo..oo} x^(n^2) = theta_3(x).

Original entry on oeis.org

2, 0, 0, 2, -4, 8, -16, 32, -54, 108, -184, 368, -628, 1296, -2160, 4610, -7708, 15848, -27592, 58316, -98496, 207576, -364720, 756872, -1341970, 2778300, -4918536, 10443152, -18512788, 37698416, -69273664, 145105952, -258224544, 534996900, -981494752, 2020011290, -3714566308, 7614288360
Offset: 1

Author

Neil Bickford, Mar 06 2021

Keywords

Comments

Coefficients in the power product expansion for theta_3(x), the third Jacobi theta function, described in A000122, also denoted theta_3(0, x) or theta_00(1, x).
See A147541 for additional references.
a(9) = -54 is the first term whose absolute value is not a power of 2.

Examples

			This gives 1 + 2x + 2x^4 + 2x^9 + ... = (1+2x)*(1+2x^4)*(1-4x^5)*(1+8x^6)*...
To compute this sequence's terms, start with the series expansion 1 + 2x + 2x^4 + 2x^9 + ...; this gives a(1) = 2, then divide by 1 + a(1)*x to get 1 + 2x^4 - 4x^5 + 8x^6 - 16x^7 ...; this gives a(2) = a(3) = 0 and a(4) = 2, then divide by 1 + a(4)*x to get 1 - 4x^5 + 8x^6 - 16x^7 ...; this gives a(5) = -4, then divide by 1 + a(5)*x to get 1 + 8x^6 - 16x^7 ...
		

References

  • Bill Gosper and Joerg Arndt, Discussions in Math-Fun Mailing List, circa Feb 25 2021 - Mar 2 2021.

Crossrefs

Programs

  • Mathematica
    FoldPairList[{Coefficient[#1, q^#2], #1/(1 + q^#2 Coefficient[#1, q^#2])} &, #, Range[#[[5]] - 1]] &[Series[EllipticTheta[3, 0, q], {q, 0, 100}]] (* based on code from Bill Gosper, Feb 25 2021 *)
Showing 1-8 of 8 results.