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

A291355 Number of permutations s_1,s_2,...,s_n of 1,2,...,n such that for all j=1,2,...,n, j divides Sum_{i=1..j} s_i^3.

Original entry on oeis.org

1, 1, 0, 2, 4, 8, 0, 8, 16, 24, 0, 46, 46, 46, 0, 218, 1658, 6542, 0, 0, 2172, 6200, 0, 0, 0, 0, 0, 1652, 5878, 26778, 0, 6242, 6242, 6242, 0, 0, 0, 179878, 0, 169024, 472924, 603878, 0, 123100, 123100, 758560, 0, 0, 0, 0, 0, 0, 244698, 489396, 0, 495512
Offset: 0

Views

Author

Seiichi Manyama, Aug 23 2017

Keywords

Comments

a(n) = 0 if n == 2 mod 4 as in this case n does not divide (n(n+1)/2)^2. In addition, a(4m+2) <= a(4m+3) <= a(4m+4) <= a(4m+5) for all m. - Chai Wah Wu, Aug 23 2017
The similar sequence b(n) in which the element of the permutation are squared instead of cubed, seems much more sparse. For 1 < n <= 250, the only nonzero terms are b(11)=12 and b(23)=480. - Giovanni Resta, Aug 23 2017

Examples

			1 divides 1^3,
2 divides 1^3 + 3^3,
3 divides 1^3 + 3^3 + 2^3,
4 divides 1^3 + 3^3 + 2^3 + 4^3.
So [1, 3, 2, 4] satisfies all the conditions.
---------------------------------------------
a(1) = 1: [[1]];
a(3) = 2: [[1, 3, 2], [3, 1, 2]];
a(4) = 4: [[1, 3, 2, 4], [2, 4, 3, 1], [3, 1, 2, 4], [4, 2, 3, 1]];
a(5) = 8: [[1, 3, 2, 4, 5], [2, 4, 3, 1, 5], [2, 4, 3, 5, 1], [3, 1, 2, 4, 5], [3, 5, 4, 2, 1], [4, 2, 3, 1, 5], [4, 2, 3, 5, 1], [5, 3, 4, 2, 1]].
		

Crossrefs

Cf. A291445.

Programs

  • Ruby
    def search(a, sum, k, size, num)
      if num == size + 1
        @cnt += 1
      else
        (1..size).each{|i|
          if a[i - 1] == 0 && (sum + i ** k) % num == 0
            a[i - 1] = 1
            search(a, sum + i ** k, k, size, num + 1)
            a[i - 1] = 0
          end
        }
      end
    end
    def A(k, n)
      a = [0] * n
      @cnt = 0
      search(a, 0, k, n, 1)
      @cnt
    end
    def A291355(n)
      (0..n).map{|i| A(3, i)}
    end
    p A291355(20)

Extensions

a(0), a(13)-a(30) from Alois P. Heinz, Aug 23 2017
a(31)-a(55) from Giovanni Resta, Aug 23 2017

A291519 Number of permutations s_1,s_2,...,s_n of 1,2,...,n with s_n = 1 (if n>0) and such that for all j=1,2,...,n, Sum_{i=1..j} s_i divides Sum_{i=1..j} s_i^3.

Original entry on oeis.org

1, 1, 1, 2, 6, 18, 42, 90, 228, 498, 1152, 2274, 5460, 10308, 20868, 39222, 78126, 151092, 306144, 596796, 1204734, 2359518, 4720854, 9229200, 18329442, 35889966, 71284524, 140430234, 279790956, 554351988, 1105988208, 2195249184, 4371548958, 8665192968
Offset: 0

Views

Author

Seiichi Manyama, Aug 25 2017

Keywords

Comments

Appears to approximately double (for n > 1) for each successive n. - Chai Wah Wu, Aug 26 2017

Examples

			5                 divides 5^3,
5 + 4             divides 5^3 + 4^3,
5 + 4 + 3         divides 5^3 + 4^3 + 3^3,
5 + 4 + 3 + 2     divides 5^3 + 4^3 + 3^3 + 2^3,
5 + 4 + 3 + 2 + 1 divides 5^3 + 4^3 + 3^3 + 2^3 + 1^3.
So [5, 4, 3, 2, 1] satisfies all the conditions.
-------------------------------------------------------
a(1) = 1: [[1]];
a(2) = 1: [[2, 1]];
a(3) = 2: [[2, 3, 1], [3, 2, 1]];
a(4) = 6: [[2, 3, 4, 1], [2, 4, 3, 1], [3, 2, 4, 1], [3, 4, 2, 1], [4, 2, 3, 1], [4, 3, 2, 1]];
a(5) = 18: [[2, 3, 4, 5, 1], [2, 3, 5, 4, 1], [2, 4, 3, 5, 1], [2, 5, 3, 4, 1], [3, 2, 4, 5, 1], [3, 2, 5, 4, 1], [3, 4, 2, 5, 1], [3, 4, 5, 2, 1], [3, 5, 2, 4, 1], [3, 5, 4, 2, 1], [4, 2, 3, 5, 1], [4, 3, 2, 5, 1], [4, 3, 5, 2, 1], [4, 5, 3, 2, 1], [5, 2, 3, 4, 1], [5, 3, 2, 4, 1], [5, 3, 4, 2, 1], [5, 4, 3, 2, 1]].
		

Crossrefs

Formula

A291445(n) >= a(n) + A291518(n) for n > 1.

Extensions

a(0), a(14)-a(33) from Alois P. Heinz, Aug 25 2017

A291518 Number of permutations s_1,s_2,...,s_n of 1,2,...,n with s_n = n (if n>0) and such that for all j=1,2,...,n, Sum_{i=1..j} s_i divides Sum_{i=1..j} s_i^3.

Original entry on oeis.org

1, 1, 1, 2, 6, 12, 30, 78, 186, 414, 912, 2064, 4338, 9798, 20106, 40974, 80196, 158322, 309414, 615558, 1212402, 2417136, 4776654, 9497508, 18726708, 37056150, 72946116, 144230640, 284660874, 564451830, 1118803818, 2224792026, 4420041210, 8791590168
Offset: 0

Views

Author

Seiichi Manyama, Aug 25 2017

Keywords

Examples

			1                 divides 1^3,
1 + 2             divides 1^3 + 2^3,
1 + 2 + 3         divides 1^3 + 2^3 + 3^3,
1 + 2 + 3 + 4     divides 1^3 + 2^3 + 3^3 + 4^3,
1 + 2 + 3 + 4 + 5 divides 1^3 + 2^3 + 3^3 + 4^3 + 5^3.
So [1, 2, 3, 4, 5] satisfies all the conditions.
-------------------------------------------------------
a(1) = 1: [[1]];
a(2) = 1: [[1, 2]];
a(3) = 2: [[1, 2, 3], [2, 1, 3]];
a(4) = 6: [[1, 2, 3, 4], [1, 3, 2, 4], [2, 1, 3, 4], [2, 3, 1, 4], [3, 1, 2, 4], [3, 2, 1, 4]];
a(5) = 12: [[1, 2, 3, 4, 5], [1, 3, 2, 4, 5], [2, 1, 3, 4, 5], [2, 3, 1, 4, 5], [2, 3, 4, 1, 5], [2, 4, 3, 1, 5], [3, 1, 2, 4, 5], [3, 2, 1, 4, 5], [3, 2, 4, 1, 5], [3, 4, 2, 1, 5], [4, 2, 3, 1, 5], [4, 3, 2, 1, 5]].
		

Crossrefs

Formula

a(n+1) = A291445(n).
A291445(n) >= a(n) + A291519(n) for n > 1.
Showing 1-3 of 3 results.