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.

Previous Showing 11-14 of 14 results.

A114902 Number of compositions of {1,..,n} such that no two adjacent parts are of equal size (labeled Carlitz compositions).

Original entry on oeis.org

1, 1, 1, 7, 21, 81, 793, 4929, 33029, 388537, 3751311, 37585989, 523395777, 6814401361, 90789460427, 1486639926417, 24213653736389, 403184436319401, 7665459211898263, 149067938821523349, 2971265450045056871, 64800464138121854877, 1460876941168812354947
Offset: 0

Views

Author

Christian G. Bower, Jan 05 2006

Keywords

Crossrefs

Column k=1 of A261959.

Programs

  • Maple
    b:= proc(n, i) option remember;
          `if`(n=0, 1, add(`if`(i=j, 0, b(n-j,
          `if`(j>n-j, 0, j)) *binomial(n, j)), j=1..n))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..25);  # Alois P. Heinz, Sep 04 2015
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0, 1, Sum[If[i==j, 0, b[n-j, If[j>n-j, 0, j]]* Binomial[n, j]], {j, 1, n}]]; a[n_] := b[n, 0]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Feb 20 2017, after Alois P. Heinz *)

Formula

a(n) ~ c * d^n * n^(n + 1/2), where d = 0.37565358657373546999489873158654700..., c = 2.0427954030382239202983023897265... - Vaclav Kotesovec, Sep 21 2019

A262047 Number of ordered partitions of [n] such that at least two parts have the same size.

Original entry on oeis.org

0, 0, 2, 6, 66, 510, 4280, 46536, 542962, 7074654, 101914512, 1621871196, 28087868160, 526841965260, 10641234260358, 230278335503586, 5315641087796562, 130370690653563150, 3385534274596691456, 92801584815121975452, 2677687776095609649256
Offset: 0

Views

Author

Alois P. Heinz, Sep 09 2015

Keywords

Comments

All terms are even.

Crossrefs

Programs

  • Maple
    g:= proc(n) option remember; `if`(n<2, 1,
           add(binomial(n, k)*g(k), k=0..n-1))
        end:
    b:= proc(n, i, p) option remember;
          `if`(i*(i+1)/2n, 0, b(n-i, i-1, p+1)*binomial(n, i))))
        end:
    a:= n-> g(n)-b(n$2, 0):
    seq(a(n), n=0..25);
  • Mathematica
    g[n_] := g[n] = If[n<2, 1, Sum[Binomial[n, k]*g[k], {k, 0, n-1}]]; b[n_, i_, p_] := b[n, i, p] = If[i*(i+1)/2n, 0, b[n-i, i-1, p+1]*Binomial[n, i]]]]; a[n_] := g[n] - b[n, n, 0]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Feb 15 2017, translated from Maple *)

Formula

a(n) = A000670(n) - A032011(n).

A336138 Number of set partitions of the binary indices of n with distinct block-sums.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 4, 1, 2, 2, 5, 2, 4, 5, 12, 1, 2, 2, 5, 2, 5, 4, 13, 2, 4, 5, 13, 5, 13, 13, 43, 1, 2, 2, 5, 2, 5, 5, 13, 2, 5, 4, 14, 5, 13, 14, 42, 2, 4, 5, 13, 5, 14, 13, 43, 5, 13, 14, 45, 14, 44, 44, 160, 1, 2, 2, 5, 2, 5, 5, 14, 2, 5, 5, 14, 4, 13
Offset: 0

Views

Author

Gus Wiseman, Jul 12 2020

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.

Examples

			The a(n) set partitions for n = 3, 7, 11, 15, 23:
  {12}    {123}      {124}      {1234}        {1235}
  {1}{2}  {1}{23}    {1}{24}    {1}{234}      {1}{235}
          {13}{2}    {12}{4}    {12}{34}      {12}{35}
          {1}{2}{3}  {14}{2}    {123}{4}      {123}{5}
                     {1}{2}{4}  {124}{3}      {125}{3}
                                {13}{24}      {13}{25}
                                {134}{2}      {135}{2}
                                {1}{2}{34}    {15}{23}
                                {1}{23}{4}    {1}{2}{35}
                                {1}{24}{3}    {1}{25}{3}
                                {14}{2}{3}    {13}{2}{5}
                                {1}{2}{3}{4}  {15}{2}{3}
                                              {1}{2}{3}{5}
		

Crossrefs

The version for twice-partitions is A271619.
The version for partitions of partitions is (also) A271619.
These set partitions are counted by A275780.
The version for factorizations is A321469.
The version for normal multiset partitions is A326519.
The version for equal block-sums is A336137.
Set partitions with distinct block-lengths are A007837.
Set partitions of binary indices are A050315.
Twice-partitions with equal sums are A279787.
Partitions of partitions with equal sums are A305551.
Normal multiset partitions with equal block-lengths are A317583.
Multiset partitions with distinct block-sums are ranked by A326535.

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[sps[bpe[n]],UnsameQ@@Total/@#&]],{n,0,100}]

A032013 Number of ways to partition n labeled elements into sets of different sizes of at least 2 and order the sets.

Original entry on oeis.org

1, 0, 1, 1, 1, 21, 31, 113, 169, 8053, 15871, 71325, 300147, 816401, 63105953, 161203747, 856049593, 4050514725, 25570388671, 80377109117, 12126315199099, 36747628912981, 233849676829957, 1239662165799711, 8321234529548651, 59953576690379081
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A032011.

Programs

  • Maple
    b:= proc(n, i, p) option remember;
          `if`(n=0, p!, `if`(i<2, 0, b(n, i-1, p)+
          `if`(i>n, 0, b(n-i, i-1, p+1)*binomial(n, i))))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..30);  # Alois P. Heinz, May 11 2016
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, p!, If[i < 2, 0, b[n, i - 1, p] + If[i > n, 0, b[n - i, i - 1, p + 1]*Binomial[n, i]]]]; a[n_] := b[n, n, 0]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 27 2017, after Alois P. Heinz *)
  • PARI
    seq(n)=[subst(serlaplace(y^0*p),y,1) | p <- Vec(serlaplace(prod(k=2, n, 1 + x^k*y/k! + O(x*x^n))))] \\ Andrew Howroyd, Sep 13 2018

Formula

"AGJ" (ordered, elements, labeled) transform of 0, 1, 1, 1...

Extensions

a(0)=1 prepended by Alois P. Heinz, May 11 2016
Previous Showing 11-14 of 14 results.