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.

A347599 Irregular table read by rows, T(n, k) is the rank of the k-th Genocchi permutation of {1,...,n}, permutations sorted in lexicographical order. If no Genocchi permutation of {1,...,n} exists, then T(n, 1) = 0 by convention.

Original entry on oeis.org

1, 0, 5, 0, 67, 91, 92, 0, 1897, 2017, 2018, 2617, 2619, 2737, 2738, 2739, 2740, 3457, 3458, 3459, 3460, 4177, 4178, 4179, 4180, 0, 99241, 99961, 99962, 104281, 104283, 105001, 105002, 105003, 105004, 110041, 110042, 110043, 110044, 115081, 115082, 115083
Offset: 1

Views

Author

Peter Luschny, Sep 08 2021

Keywords

Comments

Let M be the n X n matrix with M(j, k) = floor((2*j - k ) / n). A Genocchi permutation of order n is a permutation sigma of {1,...,n} if Product_{k=1..n} M(k, sigma(k)) does not vanish.
Let P(n) denote the number of Genocchi permutations of order n. Zhi-Wei Sun conjectured, using permanents, that P(n - 1) = G(n), where G(n) are the Genocchi numbers A036968. From the well-known relation between Genocchi and Bernoulli numbers this implies, assuming the conjecture:
Bernoulli(n) = P(n - 1) / ((-1)^floor(n/2)*(2^(n + 2) - 2)) for n >= 2.
The related sequence A347600 lists Seidel permutations.

Examples

			Table starts:
[1] 1;
[2] 0;
[3] 5;
[4] 0;
[5] 67, 91, 92;
[6] 0;
[7] 1897, 2017, 2018, 2617, 2619, 2737, 2738, 2739, 2740, 3457, 3458, 3459, 3460, 4177, 4178, 4179, 4180;
.
The 17 permutations corresponding to the ranks are for n = 7:
1897 -> [3571246]; 2017 -> [3671245]; 2018 -> [3671254]; 2617 -> [4571236];
2619 -> [4571326]; 2737 -> [4671235]; 2738 -> [4671253]; 2739 -> [4671325];
2740 -> [4671352]; 3457 -> [5671234]; 3458 -> [5671243]; 3459 -> [5671324];
3460 -> [5671342]; 4177 -> [6571234]; 4178 -> [6571243]; 4179 -> [6571324];
4180 -> [6571342].
.
17 / (-510) = -1/30 = Bernoulli(8).
		

Crossrefs

Programs

  • Julia
    using Combinatorics
    function GenocchiPermutations(n)
        f(m) = m >= n ? 1 : m < 0 ? -1 : 0
        Mat(n) = [[f(2*j - k) for k in 1:n] for j in 1:n]
        M = Mat(n); P = permutations(1:n); R = Int64[]
        S, rank = 0, 1
        for p in P
            m = prod(M[k][p[k]] for k in 1:n)
            if m != 0
                S += m
                push!(R, rank)
            end
            rank += 1
        end
        # println(n, "  ", S, "  ", S // (2^(n + 2) - 2)) # Bernoulli number
        return R
    end
    for n in 1:11 println(GenocchiPermutations(n)) end