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-2 of 2 results.

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

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 2, 0, 1, 2, 2, 0, 15, 23, 39, 0, 105, 183, 322, 0, 1016, 1848, 3347, 0, 10968, 19943, 36549, 0, 123086, 227037, 420857, 0, 1449771, 2700611, 5036699, 0, 17641455, 33106802, 62213791, 0, 220663135, 416387896, 786930971, 0, 2821102744
Offset: 1

Views

Author

Seiichi Manyama, Sep 17 2017

Keywords

Crossrefs

Formula

a(n) = A292474(n)/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.
Showing 1-2 of 2 results.