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.

A238639 Position of [n, n-1, ..., 2, 1] in Mathematica-ordered list of partitions of n(n+1)/2.

This page as a plain text file.
%I A238639 #25 Feb 20 2020 20:30:05
%S A238639 1,1,2,6,23,103,498,2493,12741,66224,348963,1859009,9994196,54155387,
%T A238639 295477841,1621962199,8951635343,49644856801,276540258555,
%U A238639 1546630084062,8681889729354,48900895532763,276302483274825,1565747892473958,8896975706929141,50683901455201860
%N A238639 Position of [n, n-1, ..., 2, 1] in Mathematica-ordered list of partitions of n(n+1)/2.
%H A238639 Alois P. Heinz, <a href="/A238639/b238639.txt">Table of n, a(n) for n = 0..200</a>
%H A238639 Manfred Scheucher, <a href="/A238639/a238639.c.txt">C Code</a>
%e A238639 The partitions of 6 in Mathematica order are 6, 51, 42, 411, 33, 321, 3111, 222, 2211, 21111, 111111.  The position of 321 is a(3) = 6.
%p A238639 g:= (n, i)-> `if`(n=0, 1, g(n-i+1, i-1)+ b(n-i, i)):
%p A238639 b:= proc(n, i) option remember; `if`(n=0, 1,
%p A238639      `if`(i<1, 0, b(n, i-1)+`if`(i>n, 0, b(n-i, i))))
%p A238639     end:
%p A238639 a:= n-> (m-> add(b(m-j, min(j, m-j)), j=n+1..m)+
%p A238639                  g(m-n, n))(n*(n+1)/2):
%p A238639 seq(a(n), n=0..25);  # _Alois P. Heinz_, Jun 03 2015
%t A238639 r[n_] := Table[n - k, {k, 0, n - 1}]; Flatten[Table[Position[IntegerPartitions[n (n + 1)/2], r[n]], {n, 0, 2}]]
%t A238639 g[n_, i_] := If[n==0, 1, g[n-i+1, i-1] + b[n-i, i]]; b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-1] + If[i>n, 0, b[n-i, i]]]]; a[n_] := Function[m, Sum[b[m-j, Min[j, m-j]], {j, n+1, m}] + g[m-n, n]][n(n+1)/2]; Table[a[n], {n, 0, 25}] (* _Jean-François Alcover_, Oct 28 2015, after _Alois P. Heinz_ *)
%Y A238639 Cf. A000217, A080577 (Mathematica ordering), A238638, A238640, A330661, A332706.
%K A238639 nonn
%O A238639 0,3
%A A238639 _Clark Kimberling_, Mar 04 2014
%E A238639 a(13)-a(17) from _Manfred Scheucher_, Jun 01 2015
%E A238639 a(18)-a(25) from _Alois P. Heinz_, Jun 02 2015