login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A357329 Triangular array read by rows: T(n, k) = number of occurrences of 2k as a sum |1 - p(1)| + |2 - p(2)| + ... + |n - p(n)|, where (p(1), p(2), ..., p(n)) ranges through the permutations of (1,2,...,n), for n >= 1, 0 <= k <= n-1. 3
1, 1, 1, 1, 2, 3, 1, 3, 7, 9, 1, 4, 12, 24, 35, 1, 5, 18, 46, 93, 137, 1, 6, 25, 76, 187, 366, 591, 1, 7, 33, 115, 327, 765, 1523, 2553, 1, 8, 42, 164, 524, 1400, 3226, 6436, 11323, 1, 9, 52, 224, 790, 2350, 6072, 13768, 27821, 50461, 1, 10, 63, 296, 1138, 3708, 10538, 26480, 59673, 121626, 226787 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
In the Name, (1,2,...,n) can be replaced by any of its permutations. The first 10 row sums are the first 10 terms of A263898.
LINKS
EXAMPLE
First 8 rows:
1
1 1
1 2 3
1 3 7 9
1 4 12 24 35
1 5 18 46 93 137
1 6 25 76 187 366 591
1 7 33 115 327 765 1523 2553
For n=3, write
123 123 123 123 123 123
123 132 213 231 312 312
000 011 110 112 211 211,
where row 3 represents |1 - p(1)| + |2 - p(2)| + |3 - p(n)| for the 6 permutations (p(1), p(2), p(2)) in row 3. The sums in row 3 are 0,2,2,4,4,4, so that the numbers 0, 2, 4 occur with multiplicities 1, 2, 3, as in row 3 of the array.
MAPLE
g:= proc(h, n) local i, j; j:= irem(h, 2, 'i');
1-`if`(h=n, 0, (i+1)*z*t^(i+j)/g(h+1, n))
end:
T:= n-> (p-> seq(coeff(p, t, k), k=0..n-1))
(coeff(series(1/g(0, n), z, n+1), z, n)):
seq(T(n), n=1..12); # Alois P. Heinz, Oct 02 2022
MATHEMATICA
p[n_] := p[n] = Permutations[Range[n]];
f[n_, k_] := f[n, k] = Abs[p[n][[k]] - Range[n]]
c[n_, k_] := c[n, k] = Total[f[n, k]]
t[n_] := Table[c[n, k], {k, 1, n!}]
u = Table[Count[t[n], 2 m], {n, 1, 10}, {m, 0, n - 1}] (* A357329, array *)
Flatten[u] (* A357329, sequence *)
CROSSREFS
Subtriangle of A062869.
Sequence in context: A236918 A152821 A071943 * A062869 A102473 A011117
KEYWORD
nonn,tabl
AUTHOR
Clark Kimberling, Sep 24 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 27 15:27 EDT 2024. Contains 372019 sequences. (Running on oeis4.)