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.

A147681 Late-growing permutations: number of permutations of 1..n with every partial sum <= the same partial sum averaged over all permutations.

This page as a plain text file.
%I A147681 #35 Dec 23 2024 14:53:42
%S A147681 1,1,1,3,7,35,139,1001,5701,53109,402985,4605271,43665667,589809987,
%T A147681 6735960079,104899483845,1402547616085,24698838710457,378845419610773,
%U A147681 7444522779300351,128830635114146047,2792467448952670671,53854927962971227495,1276369340371154144337,27141331409803338993193,698008560075731437652425,16228797258964121571885457,450111715263775132783135875
%N A147681 Late-growing permutations: number of permutations of 1..n with every partial sum <= the same partial sum averaged over all permutations.
%C A147681 Same as A145874.
%H A147681 David Scambler et al., <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2012-August/010018.html">A147681 Late-growing permutations</a> and follow-up messages on the SeqFan list, Aug 10 2012
%p A147681 a:= proc(n) option remember; local b, m; m:= n*(n+1)/2;
%p A147681       b:= proc(s) option remember; local h, g; h:= nops(s);
%p A147681             g:= (n-h+1)*(1+n)/2 -m +add(i, i=s); `if`(h<2, 1,
%p A147681             add(`if`(s[i]<=g, b(subsop(i=NULL, s)), 0), i=1..h))
%p A147681           end; forget(b);
%p A147681       b([$1..n])
%p A147681     end:
%p A147681 seq(a(n), n=0..15);  # _Alois P. Heinz_, Aug 10 2012
%t A147681 a[n_] := a[n] = Module[{b, m}, m = n*(n+1)/2; b[s_List] := b[s] = Module[{h, g}, h = Length[s]; g = (n-h+1)*(1+n)/2 - m + Total[s]; If[h<2, 1, Sum[If[s[[i]] <= g, b[ReplacePart[s, i -> Sequence[]]], 0], {i, 1, h}]]];  b[Range[n]]]; Table[a[n], {n, 0, 15}] (* _Jean-François Alcover_, Mar 13 2015, after _Alois P. Heinz_ *)
%Y A147681 This is the first of 19 related sequences, the others being A147682, A147684, A147686, A147687, A147692, A147694, A147695, A147697, A147698, A147700, A147705, A147707, A147712, A147713, A147714, A147715, A147717, A147769.
%Y A147681 Column k=1 of A215561.
%K A147681 nonn,hard
%O A147681 0,4
%A A147681 _R. H. Hardin_, May 01 2009
%E A147681 a(22) from _Alois P. Heinz_, Aug 10 2012
%E A147681 a(23) from _Alois P. Heinz_, Nov 01 2014
%E A147681 a(24)-a(25) from _Vaclav Kotesovec_, Jan 31 2015
%E A147681 a(26)-a(27) from _Vaclav Kotesovec_, Sep 07 2016