login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A147679 Triangle read by rows: T(n,k) (n >= 1, 0 <= k <= n-1) is the number of permutations of [0..(n-1)] of spread k. 1
1, 1, 1, 0, 3, 3, 4, 8, 4, 8, 20, 25, 25, 25, 25, 144, 108, 108, 144, 108, 108, 630, 735, 735, 735, 735, 735, 735, 5696, 4608, 5248, 4608, 5696, 4608, 5248, 4608, 39366, 40824, 40824, 39285, 40824, 40824, 39285, 40824, 40824, 366400, 362000, 362000, 362000, 362000, 366400, 362000, 362000, 362000, 362000 (list; table; graph; refs; listen; history; internal format)
OFFSET

1,5

COMMENTS

The reference gives more terms, formulae, connection with A003112, etc.

s(pi):= Sum_{j=0..n-1} j*pi(j) (mod j) is defined as the spread of a permutation pi of [0..(n-1)].

LINKS

R. L. GRAHAM and D. H. LEHMER, ON THE PERMANENT OF SCHUR'S MATRIX, J. Australian Math. Soc., 21A (1976), 487-497.

EXAMPLE

Triangle begins:

1

1     1

0     3   3

4     8   4   8

20   25  25  25  25

144 108 108 144 108 108

...

MAPLE

b:= proc(n) option remember;

     local l, p, r;

     l:= array([i$i=0..n-1]);

     r:= array([0$i=1..n]);

     p:= proc(t, s)

      local d, h, j;

      if t=n then d:= ((s+(n-1)*l[n]) mod n) +1;

                  r[d]:= r[d]+1

      else for j from t to n do

            l[t], l[j]:= l[j], l[t];

            p(t+1, (s+(t-1)*l[t]) )

           od;

           h:= l[t];

           for j from t to n-1 do l[j]:= l[j+1] od;

           l[n]:= h

      fi

     end;

     p(1, 0);

     eval(r)

    end:

T:= (n, k)-> b(n)[k+1]:

seq (seq (T(n, k), k=0..n-1), n=1..10);

PROG

(Sage)

@CachedFunction

def A147679_row(n):

....row = [0]*n

....for p in Permutations(range(n)):

........spread = sum(i*px for i, px in enumerate(p)) % n

........row[spread] += 1

....return row

A147679 = lambda n, k: A147679_row(n)[k] # [D. S. McNeil, Dec 23 2010]

CROSSREFS

Cf. A003112. Row sums give: A000142. Columns k=0-3 give: A004204, A004205, A004206, A004246. Diagonal gives: A004205.

Sequence in context: A205116 A011959 A049927 * A137417 A137418 A155822

Adjacent sequences:  A147676 A147677 A147678 * A147680 A147681 A147682

KEYWORD

nonn,tabl

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com), May 01 2009

EXTENSIONS

Edited by Alois P. Heinz (heinz(AT)hs-heilbronn.de), Dec 22 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 16:49 EST 2012. Contains 206058 sequences.