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.

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

Views

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

A292474 Number of solutions to +-1 +- 5 +- 12 +- ... +- n*(3*n-1)/2 = 0.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 2, 2, 4, 0, 2, 4, 4, 0, 30, 46, 78, 0, 210, 366, 644, 0, 2032, 3696, 6694, 0, 21936, 39886, 73098, 0, 246172, 454074, 841714, 0, 2899542, 5401222, 10073398, 0, 35282910, 66213604, 124427582, 0, 441326270, 832775792, 1573861942, 0, 5642205488
Offset: 0

Views

Author

Seiichi Manyama, Sep 17 2017

Keywords

Examples

			For n=6 the 2 solutions are +1+5-12+22+35-51 = 0 and -1-5+12-22-35+51 = 0.
		

Crossrefs

Programs

  • PARI
    {a(n) = polcoeff(prod(k=1, n, x^(k*(3*k-1)/2)+1/x^(k*(3*k-1)/2)), 0)}

Formula

Constant term in the expansion of Product_{k=1..n} (x^(k*(3*k-1)/2)+1/x^(k*(3*k-1)/2)).
a(4*k+1) = 0 for k >= 0.

A359348 Maximal coefficient of (1 + x) * (1 + x^3) * (1 + x^6) * ... * (1 + x^(n*(n+1)/2)).

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 4, 5, 7, 12, 18, 27, 44, 73, 122, 210, 362, 620, 1050, 1857, 3290, 5949, 10665, 19086, 34330, 62252, 113643, 209460, 383888, 706457, 1300198, 2407535, 4468367, 8331820, 15525814, 28987902, 54180854, 101560631, 190708871, 358969426
Offset: 0

Views

Author

Seiichi Manyama, Dec 27 2022

Keywords

Examples

			(1 + x) * (1 + x^3) * (1 + x^6) * (1 + x^10) = 1 + x + x^3 + x^4 + x^6 + x^7 + x^9 + 2 * x^10 + x^11 + x^13 + x^14 + x^16 + x^17 + x^19 + x^20. So a(4) = 2.
		

Crossrefs

Programs

  • PARI
    a(n) = vecmax(Vec(prod(k=1, n, 1+x^(k*(k+1)/2))));

Formula

a(n) ~ sqrt(5) * 2^(n + 3/2) / (sqrt(Pi) * n^(5/2)). - Vaclav Kotesovec, Dec 29 2022

A369344 a(n) is the constant term in expansion of Product_{k=1..n} (x^(k*(k+1)/2) + 1 + 1/x^(k*(k+1)/2)).

Original entry on oeis.org

1, 1, 1, 1, 3, 5, 11, 27, 61, 133, 311, 761, 1839, 4575, 11573, 29641, 76487, 199617, 524067, 1384697, 3681069, 9841217, 26437741, 71369101, 193496241, 526685793, 1438816755, 3944034221, 10845006963, 29908325821, 82707648985, 229306378067, 637283978821
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 20 2024

Keywords

Comments

All terms are odd.
a(n) is the number of solutions to 0 = Sum_{i=1..n} c_i * i*(i+1)/2 with c_i in {-1,0,1}.

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n>i*(i+1)*(i+2)/6, 0, `if`(i=0, 1,
          b(n, i-1)+b(n+i*(i+1)/2, i-1)+b(abs(n-i*(i+1)/2), i-1)))
        end:
    a:= n-> b(0, n):
    seq(a(n), n=0..33);  # Alois P. Heinz, Jan 21 2024
  • Mathematica
    Table[Coefficient[Product[x^(k (k + 1)/2) + 1 + 1/x^(k (k + 1)/2), {k, 1, n}], x, 0], {n, 0, 31}]

Formula

a(n) ~ sqrt(5) * 3^(n + 1/2) / (sqrt(Pi) * n^(5/2)). - Vaclav Kotesovec, Jan 22 2024

A351002 Number of solutions to +-1 +- 3 +- 6 +- 10 +- ... +- n*(n + 1)/2 = n.

Original entry on oeis.org

1, 1, 1, 0, 0, 1, 3, 0, 4, 3, 9, 0, 27, 43, 71, 0, 190, 318, 604, 0, 1846, 3127, 5664, 0, 19048, 34065, 62045, 0, 205713, 378243, 705836, 0, 2403370, 4434940, 8276125, 0, 28980680, 54167797, 101541048, 0, 358095372, 674776903, 1274888645, 0, 4551828850, 8612421500
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 29 2022

Keywords

Crossrefs

Programs

  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def b(n, i):
        if n > i*(i+1)*(i+2)//6: return 0
        if i == 0: return 1
        return b(n+i*(i+1)//2, i-1) + b(abs(n-i*(i+1)//2), i-1)
    def a(n): return b(n, n)
    print([a(n) for n in range(50)]) # Michael S. Branicky, Jan 29 2022

Formula

a(n) = [x^n] Product_{k=1..n} (x^(k*(k+1)/2) + 1/x^(k*(k+1)/2)).

A292510 a(n) = smallest k >= 1 such that {1, p(n,2), p(n,3), ..., p(n,k)} can be partitioned into two sets with equal sums, where p(n,m) is m-th n-gonal number.

Original entry on oeis.org

4, 7, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
Offset: 3

Views

Author

Seiichi Manyama, Sep 17 2017

Keywords

Comments

Conjecture: a(n) = 7 for n > 5.

Examples

			n = 3
1+3+6 = 10
n = 4
1+4+16+49 = 9+25+36 (= 70 = 28*4-42)
n = 5
1+5+22+35 = 12+51 (=63)
n = 6
1+6+28+91 = 15+45+66 (= 126 = 28*6-42)
		

Crossrefs

Programs

  • Ruby
    def f(k, n)
      n * ((k - 2) * n - k + 4) / 2
    end
    def A(k, n)
      ary = [1]
      s_ary = [0]
      (1..n).each{|i| s_ary << s_ary[-1] + f(k, i)}
      m = s_ary[-1]
      a = Array.new(m + 1){0}
      a[0] = 1
      (1..n).each{|i|
        b = a.clone
        (0..[s_ary[i - 1], m - f(k, i)].min).each{|j| b[j + f(k, i)] += a[j]}
        a = b
        s_ary[i] % 2 == 0 ? ary << a[s_ary[i] / 2] : ary << 0
      }
      ary
    end
    def B(n)
      i = 1
      while A(n, i)[-1] == 0
        i += 1
      end
      i
    end
    def A292510(n)
      (3..n).map{|i| B(i)}
    end
    p A292510(100)

Formula

p(n,1) + p(n,2) + p(n,4) + p(n,7) = p(n,3) + p(n,5) + p(n,6) (= 28*n-42). So a(n) <= 7.

A350287 Number of solutions to +-1 +- 3 +- 6 +- 10 +- ... +- n*(n + 1)/2 = 0 or 1.

Original entry on oeis.org

1, 1, 0, 0, 2, 1, 2, 2, 4, 7, 12, 16, 26, 42, 66, 104, 210, 318, 620, 970, 1748, 3281, 5948, 10480, 18976, 34233, 60836, 111430, 209460, 378529, 704934, 1284836, 2387758, 4466874, 8331820, 15525814, 28987902, 54162165, 101242982, 190267598, 358969426, 674845081
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 19 2022

Keywords

Examples

			a(4) = 2: -1 - 3 - 6 + 10 = +1 + 3 + 6 - 10 = 0.
		

Crossrefs

Programs

  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def b(n, i):
        if n > i*(i+1)*(i+2)//6: return 0
        if i == 0: return 1
        return b(n+i*(i+1)//2, i-1) + b(abs(n-i*(i+1)//2), i-1)
    def a(n): return b(0, n) + b(1, n)
    print([a(n) for n in range(41)]) # Michael S. Branicky, Jan 19 2022

A369494 a(n) = [x^(n*(n+1)/2)] Product_{k=1..n} (x^(k*(k+1)/2) + 1/x^(k*(k+1)/2)).

Original entry on oeis.org

1, 1, 0, 0, 0, 2, 0, 3, 3, 5, 0, 14, 23, 39, 0, 101, 161, 315, 0, 971, 1595, 2872, 0, 9697, 17431, 31736, 0, 103608, 190242, 356883, 0, 1218049, 2235343, 4165201, 0, 14602056, 27304610, 51182196, 0, 179995388, 339041695, 640927871, 0, 2288387318, 4326722468, 8201714149
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 24 2024

Keywords

Crossrefs

Programs

  • Maple
    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)=2, 0, b(n*(n+1)/2, n)):
    seq(a(n), n=0..45);  # Alois P. Heinz, Jan 24 2024
  • Mathematica
    Table[Coefficient[Product[x^(k (k + 1)/2) + 1/x^(k (k + 1)/2), {k, 1, n}], x, n (n + 1)/2], {n, 0, 45}]
Showing 1-8 of 8 results.