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.

A361043 Array read by descending antidiagonals. A(n, k) is, if n > 0, the number of multiset permutations of {0, 1} of length n * k where the number of occurrences of 1 are multiples of n. A(0, k) = k + 1.

This page as a plain text file.
%I A361043 #19 Mar 20 2023 14:14:49
%S A361043 1,2,1,3,2,1,4,4,2,1,5,8,8,2,1,6,16,32,22,2,1,7,32,128,170,72,2,1,8,
%T A361043 64,512,1366,992,254,2,1,9,128,2048,10922,16512,6008,926,2,1,10,256,
%U A361043 8192,87382,261632,215766,37130,3434,2,1,11,512,32768,699050,4196352,6643782,2973350,232562,12872,2,1
%N A361043 Array read by descending antidiagonals. A(n, k) is, if n > 0, the number of multiset permutations of {0, 1} of length n * k where the number of occurrences of 1 are multiples of n. A(0, k) = k + 1.
%C A361043 Because of the interchangeability of 0 and 1 in the definition, A(n, k) is even if n, k >= 1. In other words, if the binary representation of a permutation of the defined type is counted, then so is the 1's complement of that representation.
%F A361043 A(n, k) = Sum_{j=0..k} binomial(n*k, n*j).
%F A361043 T(n, k) = Sum_{j=0..n-k} binomial((n - k)*k, j*k).
%e A361043 Array A(n, k) starts:
%e A361043  [0] 1, 2,    3,      4,        5,          6,            7, ...  A000027
%e A361043  [1] 1, 2,    4,      8,       16,         32,           64, ...  A000079
%e A361043  [2] 1, 2,    8,     32,      128,        512,         2048, ...  A081294
%e A361043  [3] 1, 2,   22,    170,     1366,      10922,        87382, ...  A007613
%e A361043  [4] 1, 2,   72,    992,    16512,     261632,      4196352, ...  A070775
%e A361043  [5] 1, 2,  254,   6008,   215766,    6643782,    215492564, ...  A070782
%e A361043  [6] 1, 2,  926,  37130,  2973350,  174174002,  11582386286, ...  A070967
%e A361043  [7] 1, 2, 3434, 232562, 42484682, 4653367842, 644032289258, ...  A094211
%e A361043 .
%e A361043 Triangle T(n, k) starts:
%e A361043  [0]  1;
%e A361043  [1]  2,   1;
%e A361043  [2]  3,   2,    1;
%e A361043  [3]  4,   4,    2,     1;
%e A361043  [4]  5,   8,    8,     2,      1;
%e A361043  [5]  6,  16,   32,    22,      2,      1;
%e A361043  [6]  7,  32,  128,   170,     72,      2,     1;
%e A361043  [7]  8,  64,  512,  1366,    992,    254,     2,    1;
%e A361043  [8]  9, 128, 2048, 10922,  16512,   6008,   926,    2, 1;
%e A361043  [9] 10, 256, 8192, 87382, 261632, 215766, 37130, 3434, 2, 1;
%e A361043 .
%e A361043 A(2, 2) = 8 = card(0000, 1100, 1010, 1001, 0110, 0101, 0011, 1111).
%e A361043 A(1, 3) = 8 = card(000, 100, 010, 001, 110, 101, 011, 111).
%p A361043 T := (n, k) -> add(binomial((n - k)*k, j*k), j = 0 .. n-k):
%p A361043 seq(print(seq(T(n, k), k = 0..n)), n = 0..7);
%o A361043 (SageMath) # In Python use this import:
%o A361043 # from sympy.utilities.iterables import multiset_permutations
%o A361043 def A(n: int, k: int) -> int:
%o A361043     if n == 0: return k + 1
%o A361043     count = 0
%o A361043     for a in range(0, n * k + 1, n):
%o A361043         S = [i < a for i in range(n * k)]
%o A361043         count += Permutations(S).cardinality()
%o A361043     return count
%o A361043 def ARow(n: int, size: int) -> list[int]:
%o A361043     return [A(n, k) for k in range(size)]
%o A361043 for n in range(6): print(ARow(n, 5))
%Y A361043 Rows: A000027 (n=0), A000079 (n=1), A081294 (n=2), A007613 (n=3), A070775 (n=4), A070782 (n=5), A070967 (n=6), A094211 (n=7), A070832 (n=8), A094213 (n=9), A070833 (n=10).
%Y A361043 Variant: A308500 (upwards antidiagonals).
%Y A361043 Cf. A167009 (main diagonal).
%K A361043 nonn,tabl
%O A361043 0,2
%A A361043 _Peter Luschny_, Mar 18 2023