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.
%I A291355 #45 Aug 26 2017 13:19:43 %S A291355 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, %T A291355 0,0,1652,5878,26778,0,6242,6242,6242,0,0,0,179878,0,169024,472924, %U A291355 603878,0,123100,123100,758560,0,0,0,0,0,0,244698,489396,0,495512 %N 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. %C A291355 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 %C A291355 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 %H A291355 Giovanni Resta, <a href="/A291355/b291355.txt">Table of n, a(n) for n = 0..100</a> %e A291355 1 divides 1^3, %e A291355 2 divides 1^3 + 3^3, %e A291355 3 divides 1^3 + 3^3 + 2^3, %e A291355 4 divides 1^3 + 3^3 + 2^3 + 4^3. %e A291355 So [1, 3, 2, 4] satisfies all the conditions. %e A291355 --------------------------------------------- %e A291355 a(1) = 1: [[1]]; %e A291355 a(3) = 2: [[1, 3, 2], [3, 1, 2]]; %e A291355 a(4) = 4: [[1, 3, 2, 4], [2, 4, 3, 1], [3, 1, 2, 4], [4, 2, 3, 1]]; %e A291355 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]]. %o A291355 (Ruby) %o A291355 def search(a, sum, k, size, num) %o A291355 if num == size + 1 %o A291355 @cnt += 1 %o A291355 else %o A291355 (1..size).each{|i| %o A291355 if a[i - 1] == 0 && (sum + i ** k) % num == 0 %o A291355 a[i - 1] = 1 %o A291355 search(a, sum + i ** k, k, size, num + 1) %o A291355 a[i - 1] = 0 %o A291355 end %o A291355 } %o A291355 end %o A291355 end %o A291355 def A(k, n) %o A291355 a = [0] * n %o A291355 @cnt = 0 %o A291355 search(a, 0, k, n, 1) %o A291355 @cnt %o A291355 end %o A291355 def A291355(n) %o A291355 (0..n).map{|i| A(3, i)} %o A291355 end %o A291355 p A291355(20) %Y A291355 Cf. A291445. %K A291355 nonn %O A291355 0,4 %A A291355 _Seiichi Manyama_, Aug 23 2017 %E A291355 a(0), a(13)-a(30) from _Alois P. Heinz_, Aug 23 2017 %E A291355 a(31)-a(55) from _Giovanni Resta_, Aug 23 2017