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.

User: Pietro Majer

Pietro Majer's wiki page.

Pietro Majer has authored 6 sequences.

A158118 Number of solutions of +-1+-2^3+-3^3..+-n^3=0.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 4, 2, 0, 0, 4, 124, 0, 0, 536, 712, 0, 0, 4574, 2260, 0, 0, 10634, 73758, 0, 0, 406032, 638830, 0, 0, 4249160, 3263500, 0, 0, 21907736, 82561050, 0, 0, 485798436, 945916970, 0, 0, 5968541478, 6839493576, 0, 0
Offset: 1

Author

Pietro Majer, Mar 12 2009

Keywords

Comments

Constant term in the expansion of (x + 1/x)(x^8 + 1/x^8)..(x^n^3 + 1/x^n^3).
a(n) = 0 for any n=1 (mod 4) or n=2 (mod 4).
The expansion above and the integral representation formula below are due to Andrica & Tomescu. The asymptotic formula is a conjecture; see Andrica & Ionascu. - Jonathan Sondow, Nov 06 2013

Examples

			Example: For n=12 the a(12) = 2 solutions are:
+1+8-27+64-125-216-343+512+729-1000-1331+1728=0,
-1-8+27-64+125+216+343-512-729+1000+1331-1728=0.
		

Crossrefs

Equals twice A113263.
Cf. A063865, A158092, A019568. - Pietro Majer, Mar 15 2009

Programs

  • Maple
    N:=60: p:=1: a:=[]: for n from 1 to N do p:=expand(p*( x^(n^3) + x^(-n^3) )): a:=[op(a), coeff(p,x,0)]: od:a;

Formula

a(n) = 2 * A113263(n).
Integral representation: a(n)=((2^n)/Pi)*int_0^Pi prod_{k=1}^n cos(x*k^3) dx.
Asymptotic formula: a(n)=(2^n)*sqrt(14/(Pi*n^7))*(1+o(1)) as n-->infty; n=-1 or 0 (mod 4).

A158465 Number of solutions to +-1+-2^4+-3^4+-4^4...+-n^4=0.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 16, 18, 0, 0, 32, 100, 0, 0, 424, 510, 0, 0, 2792, 5988, 0, 0, 29058, 45106, 0, 0, 276828, 473854, 0, 0, 2455340, 4777436, 0, 0, 27466324, 46429640, 0, 0, 280395282, 526489336, 0, 0, 3193589950, 5661226928, 0, 0
Offset: 1

Author

Pietro Majer, Mar 19 2009

Keywords

Comments

Constant term in the expansion of (x + 1/x)(x^16 + 1/x^16)..(x^n^4 + 1/x^n^4).
a(n)=0 for any n=1 (mod 4) or n=2 (mod 4).
Andrica & Tomescu give a more general integral formula than the one below. The asymptotic formula below is a conjecture by Andrica & Ionascu; it remains unproven. - Jonathan Sondow, Nov 11 2013

Examples

			For n=16 the a(16) = 2 solutions are +1 +16 +81 +256 -625 -1296 -2401 +4096 +6561 +10000 +14641 +20736 -28561 -38416 -50625 +65536 = 0 and the opposite.
		

Crossrefs

A111253(n) = a(n)/2. - Alois P. Heinz, Oct 31 2011

Programs

  • Maple
    N:=32: p:=1 a:=[]: for n from 32 to N do p:=expand
    (p*(x^(n^4)+x^(-n^4))): a:=[op(a), coeff(p,x,0)]: od:a;

Formula

Integral representation: a(n) = ((2^n)/Pi)*int_0^pi prod_{k=1}^n cos(x*k^4) dx.
Asymptotic formula: a(n) = (2^n)*sqrt(18/(Pi*n^9))*(1+o(1)) as n->infinity; n=-1 or 0 (mod 4).

Extensions

a(35)-a(58) from Alois P. Heinz, Oct 31 2011

A167028 Number of terms in the expansion of the determinant of a skew-symmetric matrix of order n.

Original entry on oeis.org

0, 1, 0, 6, 0, 120, 0, 5250, 0, 395010, 0, 45197460, 0, 7299452160, 0, 1580682203100, 0, 441926274289500, 0, 154940341854097800, 0, 66565404923242024800, 0, 34389901168124209507800, 0, 21034386936107260971255000, 0, 15032296693671903309613950000, 0, 12411582569784462888618434640000, 0
Offset: 1

Author

Pietro Majer, Oct 27 2009

Keywords

Comments

If n is odd a(n)=0.
Essentially a duplicate of A002370. - N. J. A. Sloane, Oct 27 2009

Examples

			Example: the determinant of a skew symmetric matrix of order n=4 is
det(A)=A(1,2)A(1,2)A(3,4)A(3,4) + 2A(1,2)A(2,3)A(1,4)A(3,4) -2A(1,2)A(2,4)A(1,3)A(3,4)+ A(1,3)A(1,3)A(2,4)A(2,4)-2A(1,3)A(2,4)A(1,4)A(2,3)+A(1,4)A(1,4)A(2,3)A(2,3).
		

Crossrefs

Programs

  • Maple
    for n from 1 to 20 do a[n]:=n!coeftayl( (1-x^2)^(-1/4)*exp(x^2/4),x=0,n) od;
  • Mathematica
    Rest[CoefficientList[Series[(1-x^2)^(-1/4)*E^(x^2/4), {x, 0, 20}], x] * Range[0, 20]!] (* Vaclav Kotesovec, Feb 15 2015 *)

Formula

Exponential generating function: (1-x^2)^(-1/4) exp(x^2/4).
Asymptotics (for even n): a(n)= (n!/Pi)exp( (-3log(n)+1+log(2))/4 ) GAMMA(3/4) (1+O(1/n)). [corrected by Vaclav Kotesovec, Feb 15 2015]. More elegant form is a(n) ~ n! * 2^(1/4) * exp(1/4) * GAMMA(3/4) / (Pi * n^(3/4)).

A167029 Difference between the number of positive and negative terms in the expansion of a skew symmetric matrix of order n.

Original entry on oeis.org

1, 0, 2, 0, 8, 0, 18, 0, 578, 0, -15460, 0, 1012512, 0, -81237604, 0, 8572174172, 0, -1139408178984, 0, 186543348044576, 0, -36888247922732008, 0, 8669441321229610968, 0, -2388740252077518073072, 0, 762715125987833507921408, 0, -279382350611903941569174000, 0
Offset: 1

Author

Pietro Majer, Oct 27 2009

Keywords

Comments

For even n, a(n)=0.

Crossrefs

Cf. A167028.

Programs

  • Mathematica
    Rest[Rest[CoefficientList[Series[Sqrt[Cosh[x]]*E^(x^2/4), {x, 0, 20}], x] * Range[0, 20]!]] (* Vaclav Kotesovec, Feb 15 2015 *)

Formula

E.g.f. (for offset 2): sqrt(cosh(x))*exp(x^2/4).
Asymptotics (for even n): a(n)=exp(Pi^2/16)*(2^(n-2))*(n!)*(Pi^(-n))*n^(3/4)*(1+O(1/n)) [This formula is wrong. - Vaclav Kotesovec, Feb 15 2015]
If n is odd |a(n)| ~ exp(-Pi^2/16) * 2^(n+1/2) * n! / (sqrt(n) * Pi^(n+1)). - Vaclav Kotesovec, Feb 15 2015

Extensions

More terms from Vaclav Kotesovec, Feb 15 2015

A158380 Number of solutions to +-1 +- 3 +- 6 +- ... +- n(n+1)/2 = 0.

Original entry on oeis.org

1, 0, 0, 0, 2, 0, 2, 2, 4, 0, 12, 16, 26, 0, 66, 104, 210, 0, 620, 970, 1748, 0, 5948, 10480, 18976, 0, 60836, 111430, 209460, 0, 704934, 1284836, 2387758, 0, 8331820, 15525814, 28987902, 0, 101242982, 190267598, 358969426, 0, 1275032260, 2404124188, 4547419694
Offset: 0

Author

Pietro Majer, Mar 17 2009

Keywords

Comments

Equivalently, number of partitions of the set of the first n triangular numbers {t(1),...,t(n)} into two classes with equal sums.
Constant term in the expansion of (x + 1/x)(x^3 + 1/x^3)...(x^t(n) + 1/x^t(n)).
a(n) = 0 for all n == 1 (mod 4).
Andrica & Tomescu give a more general integral formula than the one below. - Jonathan Sondow, Nov 11 2013

Examples

			For n=6 the 2 solutions are +1-3+6-10-15+21 = 0 and -1+3-6+10+15-21 = 0.
		

Crossrefs

Programs

  • Maple
    N:=70: p:=1: a:=[]: for n from 0 to N do
    p:=expand(p*(x^(n*(n+1)/2)+x^(-n*(n+1)/2))):
    a:=[op(a), coeff(p, x, 0)]: od:a;
    # second Maple program:
    b:= proc(n, i) option remember; (m-> `if`(n>m, 0,
          `if`(n=m, 1, b(abs(n-i*(i+1)/2), i-1)+
          b(n+i*(i+1)/2, i-1))))((2+(3+i)*i)*i/6)
        end:
    a:= n-> `if`(irem(n, 4)=1, 0, b(0, n)):
    seq(a(n), n=0..50);  # Alois P. Heinz, Sep 17 2017
  • Mathematica
    a[n_] := With[{t = Table[k(k+1)/2, {k, 1, n}]}, Coefficient[Times @@ (x^t + 1/x^t), x, 0]];
    Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 50}] (* Jean-François Alcover, Jun 16 2018 *)
  • PARI
    t(k) = k*(k+1)/2;
    a(n) = polcoeff(prod(k=1, n, (x^t(k)+ 1/x^t(k))), 0); \\ Michel Marcus, May 19 2015

Formula

a(n) = (2^n/Pi) * Integral_{x=0..Pi} cos(x)*cos(3x)*...*cos(n(n+1)x/2) dx.
a(n) ~ 2^(n+1)*sqrt(10/Pi)*n^(-5/2)*(1+o(1)) as n --> infinity, n !== 1 (mod 4).
a(n) = 2 * A058498(n) for n > 0. - Alois P. Heinz, Nov 01 2011

Extensions

a(0) = 1 prepended by Joerg Arndt, Sep 17 2017
Example corrected by Ilya Gutkovskiy, Feb 02 2022

A158092 Number of solutions to +- 1 +- 2^2 +- 3^2 +- 4^2 +- ... +- n^2 = 0.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 2, 10, 0, 0, 86, 114, 0, 0, 478, 860, 0, 0, 5808, 10838, 0, 0, 55626, 100426, 0, 0, 696164, 1298600, 0, 0, 7826992, 14574366, 0, 0, 100061106, 187392994, 0, 0, 1223587084, 2322159814, 0, 0, 16019866270, 30353305134, 0, 0
Offset: 1

Author

Pietro Majer, Mar 12 2009

Keywords

Comments

Twice A083527.
Number of partitions of the half of the n-th-square-pyramidal number into parts that are distinct square numbers in the range 1 to n^2. Example: a(7)=2 since, squarePyramidal(7)=140 and 70=1+4+16+49=9+25+36. - Hieronymus Fischer, Oct 20 2010
Erdős & Surányi prove that this sequence is unbounded. More generally, there are infinitely many ways to write a given number k as such a sum. - Charles R Greathouse IV, Nov 05 2012
The expansion and integral representation formulas below are due to Andrica & Tomescu. The asymptotic formula is a conjecture; see Andrica & Ionascu. - Jonathan Sondow, Nov 11 2013

Examples

			For n=8 the a(8)=2 solutions are: +1-4-9+16-25+36+49-64=0 and -1+4+9-16+25-36-49+64=0.
		

Crossrefs

Programs

  • Maple
    From Pietro Majer, Mar 15 2009: (Start)
    N:=60: p:=1: a:=[]: for n from 1 to N do p:=expand(p*(x^(n^2)+x^(-n^2))):
    a:=[op(a), coeff(p, x, 0)]: od:a; (End)
    # second Maple program:
    b:= proc(n, i) option remember; local m; m:= (1+(3+2*i)*i)*i/6;
          `if`(n>m, 0, `if`(n=m, 1, b(abs(n-i^2), i-1) +b(n+i^2, i-1)))
        end:
    a:= n-> `if`(irem(n-1, 4)<2, 0, 2*b(n^2, n-1)):
    seq(a(n), n=1..60);  # Alois P. Heinz, Nov 05 2012
  • Mathematica
    b[n_, i_] := b[n, i] = With[{m = (1+(3+2*i)*i)*i/6}, If[n>m, 0, If[n == m, 1, b[ Abs[n-i^2], i-1] + b[n+i^2, i-1]]]]; a[n_] := If[Mod[n-1, 4]<2, 0, 2*b[n^2, n-1]]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Mar 13 2015, after Alois P. Heinz *)
  • PARI
    a(n)=2*sum(i=0,2^(n-1)-1,sum(j=1,n-1,(-1)^bittest(i,j-1)*j^2)==n^2) \\ Charles R Greathouse IV, Nov 05 2012
    
  • Python
    from itertools import count, islice
    from collections import Counter
    def A158092_gen(): # generator of terms
        ccount = Counter({0:1})
        for i in count(1):
            bcount = Counter()
            for a in ccount:
                bcount[a+(j:=i**2)] += ccount[a]
                bcount[a-j] += ccount[a]
            ccount = bcount
            yield(ccount[0])
    A158092_list = list(islice(A158092_gen(),20)) # Chai Wah Wu, Jan 29 2024

Formula

Constant term in the expansion of (x + 1/x)(x^4 + 1/x^4)..(x^n^2 + 1/x^n^2).
a(n)=0 for any n == 1 or 2 (mod 4).
Integral representation: a(n)=((2^n)/pi)*int_0^pi prod_{k=1}^n cos(x*k^2) dx
Asymptotic formula: a(n) = (2^n)*sqrt(10/(pi*n^5))*(1+o(1)) as n-->infty; n == -1 or 0 (mod 4).
a(n) = 2 * A083527(n). - T. D. Noe, Mar 12 2009
min{n : a(n) > 0} = A231015(0) = 7. - Jonathan Sondow, Nov 06 2013

Extensions

a(51)-a(56) from R. H. Hardin, Mar 12 2009
Edited by N. J. A. Sloane, Sep 15 2009