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

A327844 Table read by antidiagonals: the m-th row gives the sequence constructed by repeatedly choosing the smallest positive number not already in the row such that for each k = 1, ..., m, the k-th differences are distinct.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 1, 2, 4, 3, 1, 2, 4, 3, 6, 1, 2, 4, 3, 6, 10, 1, 2, 4, 3, 6, 11, 5, 1, 2, 4, 3, 6, 11, 5, 11, 1, 2, 4, 3, 6, 11, 5, 9, 7, 1, 2, 4, 3, 6, 11, 5, 9, 7, 12, 1, 2, 4, 3, 6, 11, 5, 9, 7, 13, 9, 1, 2, 4, 3, 6, 11, 5, 9, 7, 13, 10, 16, 1, 2, 4, 3
Offset: 1

Views

Author

Peter Kagey, Sep 29 2019

Keywords

Comments

First row is A175498. Main diagonal is A327743.
The index of where the m-th row first differs from A327743 is 6, 15, 15, 16, 16, 194, 301, 301, 1036, 1036, 1036, 1037, ...
For example, T(6, 194) != A327743(194), but T(6, n) = A327743(n) for n < 194.

Examples

			Table begins:
1, 2, 4, 3, 6, 10, 5, 11, 7, 12,  9, 16, 8, 17, 15, 23, ...
1, 2, 4, 3, 6, 11, 5,  9, 7, 13, 10, 18, 8, 15, 25, 12, ...
1, 2, 4, 3, 6, 11, 5,  9, 7, 13, 10, 18, 8, 15, 25, 12, ...
1, 2, 4, 3, 6, 11, 5,  9, 7, 13, 10, 18, 8, 15, 27, 12, ...
1, 2, 4, 3, 6, 11, 5,  9, 7, 13, 10, 18, 8, 15, 27, 12, ...
1, 2, 4, 3, 6, 11, 5,  9, 7, 13, 10, 18, 8, 15, 27, 14, ...
		

Crossrefs

A329851 Sum of absolute values of n-th differences over all permutations of {0, 1, ..., n}.

Original entry on oeis.org

0, 2, 12, 120, 1320, 17856, 273056, 4772624, 92626944, 1986317024, 46556867456, 1184827221584, 32524270418432, 958020105786536
Offset: 0

Views

Author

Peter Kagey, Nov 22 2019

Keywords

Comments

a(n) <= ((n+1)! - 2*A131502(n))*A130783(n).
Every term is even because the n-th difference of a permutation and its reversal are the same up to sign.

Examples

			For n = 2, the second differences of the (2+1)! = 6 permutations of {0,1,2} are:
[0,1,2] ->  [1, 1] ->  0,
[0,2,1] ->  [2,-1] -> -3,
[1,0,2] -> [-1, 2] ->  3,
[1,2,0] ->  [1,-2] -> -3,
[2,0,1] -> [-2, 1] ->  3, and
[2,1,0] -> [-1,-1] ->  0.
The sum of the absolute values of these second differences is 0 + 3 + 3 + 3 + 3 + 0 = 12.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Block[{x, k}, k = CoefficientList[(x - 1)^n, x]; Sum[Abs[k.p], {p, Permutations@ Range[0, n]}]]; Array[a, 10, 0] (* Giovanni Resta, Nov 23 2019 *)
  • Python
    from math import comb
    from itertools import permutations
    def A329851(n):
        c = [-comb(n,i) if i&1 else comb(n,i) for i in range(n+1)]
        return sum(abs(sum(c[i]*p[i] for i in range(n+1))) for p in permutations(range(n+1)) if p[0]Chai Wah Wu, Jun 04 2024

Extensions

a(10) from Alois P. Heinz, Nov 22 2019
a(11)-a(13) from Giovanni Resta, Nov 23 2019
Showing 1-2 of 2 results.