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.

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

Original entry on oeis.org

1, 2, 0, 4, 4, 16, 12, 32, 20, 112, 88, 384, 308, 1264, 1056, 4096, 3852, 15120, 13820, 52608, 49824, 190848, 182356, 704512, 671540, 2582128, 2475220, 9615744, 9256428, 35868672, 34636840, 134217728, 130021392, 505292976, 491156304, 1909836416, 1857282536
Offset: 1

Views

Author

Seiichi Manyama, Mar 02 2018

Keywords

Examples

			Solutions for n = 7:
------------------------------
1 +3 +6 +10 +15 +21 +28 =  84.
1 +3 +6 +10 +15 +21 -28 =  28.
1 +3 +6 +10 +15 -21 +28 =  42.
1 +3 +6 +10 +15 -21 -28 = -14.
1 +3 -6 +10 -15 +21 +28 =  42.
1 +3 -6 +10 -15 +21 -28 = -14.
1 +3 -6 +10 -15 -21 +28 =   0.
1 +3 -6 +10 -15 -21 -28 = -56.
1 -3 +6 -10 -15 +21 +28 =  28.
1 -3 +6 -10 -15 +21 -28 = -28.
1 -3 +6 -10 -15 -21 +28 = -14.
1 -3 +6 -10 -15 -21 -28 = -70.
		

Crossrefs

Programs

  • Ruby
    def A(n)
      ary = [1] + Array.new(n - 1, 0)
      (1..n).each{|i|
        it = i * (i + 1)
        a = ary.clone
        (0..n - 1).each{|j| a[(j + it) % n] += ary[j]}
        ary = a
      }
      ary[(n * (n + 1) * (n + 2) / 6) % n] / 2
    end
    def A300307(n)
      (1..n).map{|i| A(i)}
    end
    p A300307(100)

Formula

a(2^n) = 2^A000325(n) for n>0 (conjectured).