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.

Showing 1-10 of 11 results. Next

A334030 Number of combinatory separations of a multiset whose multiplicities are the parts of the n-th composition in standard order.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 4, 3, 5, 7, 8, 8, 7, 9, 8, 5, 7, 12, 15, 14, 15, 17, 18, 13, 12, 17, 17, 16, 14, 16, 13, 7, 11, 19, 27, 26, 27, 37, 37, 25, 27, 37, 33, 34, 37, 40, 36, 22, 19, 32, 37, 33, 37, 38, 40, 28, 26, 33, 34, 30, 25, 28, 22, 11, 15, 30, 44, 42, 51, 68
Offset: 0

Views

Author

Gus Wiseman, Apr 16 2020

Keywords

Comments

A multiset is normal if it covers an initial interval of positive integers. The type of a multiset of integers is the unique normal multiset that has the same sequence of multiplicities when its entries are taken in increasing order. For example the type of (3,3,5,5,5,6) is (1,1,2,2,2,3).
A pair h<={g_1,...,g_k} is a combinatory separation iff there exists a multiset partition of h whose multiset of block-types is {g_1,...,g_k}. For example, the (headless) combinatory separations of the multiset (1122) are (1122), (1)(112), (1)(122), (11)(11), (12)(12), (1)(1)(11), (1)(1)(12), (1)(1)(1)(1). This list excludes (12)(11), because one cannot partition (1122) into two blocks where one block has two distinct elements and the other has two equal elements.

Examples

			The combinatory separations for n = 1, 3, 5, 9, 10, 13 (heads not shown):
  (1)  (12)    (112)      (1112)        (1122)        (1223)
       (1)(1)  (1)(11)    (1)(111)      (11)(11)      (1)(112)
               (1)(12)    (1)(112)      (1)(112)      (11)(12)
               (1)(1)(1)  (11)(12)      (1)(122)      (1)(122)
                          (1)(1)(11)    (12)(12)      (1)(123)
                          (1)(1)(12)    (1)(1)(11)    (12)(12)
                          (1)(1)(1)(1)  (1)(1)(12)    (1)(1)(11)
                                        (1)(1)(1)(1)  (1)(1)(12)
                                                      (1)(1)(1)(1)
		

Crossrefs

Multisets of compositions are A034691.
The described multiset is a row of A095684.
Combinatory separations of normal multisets are A269134.
Shuffles of compositions are counted by A292884.
Combinatory separations of prime indices are A318559.
The version for prime indices is A318560.
Combinatory separations of strongly normal multisets are A318563.
Multiset partitions of the described multiset are A333942.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Sum is A070939.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Length of Lyndon factorization is A329312.
- Dealings are counted by A333939.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
    normize[m_]:=m/.Rule@@@Table[{Union[m][[i]],i},{i,Length[Union[m]]}];
    ptnToNorm[y_]:=Join@@Table[ConstantArray[i,y[[i]]],{i,Length[y]}];
    Table[Length[Union[Table[Sort[normize/@m],{m,mps[ptnToNorm[stc[n]]]}]]],{n,0,100}]

A284001 a(n) = A005361(A283477(n)).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 4, 6, 1, 2, 4, 6, 8, 12, 18, 24, 1, 2, 4, 6, 8, 12, 18, 24, 16, 24, 36, 48, 54, 72, 96, 120, 1, 2, 4, 6, 8, 12, 18, 24, 16, 24, 36, 48, 54, 72, 96, 120, 32, 48, 72, 96, 108, 144, 192, 240, 162, 216, 288, 360, 384, 480, 600, 720, 1, 2, 4, 6, 8, 12, 18, 24, 16, 24, 36, 48, 54, 72, 96, 120, 32, 48, 72, 96, 108, 144, 192, 240, 162, 216, 288, 360, 384, 480
Offset: 0

Views

Author

Antti Karttunen, Mar 18 2017

Keywords

Comments

a(n) is the product of elements of the multiset that covers an initial interval of positive integers with multiplicities equal to the parts of the n-th composition in standard order (graded reverse-lexicographic, A066099). This composition is obtained by taking the set of positions of 1's in the reversed binary expansion of n, prepending 0, taking first differences, and reversing again. For example, the 13th composition is (1,2,1) giving the multiset {1,2,2,3} with product 12, so a(13) = 12. - Gus Wiseman, Apr 26 2020

Crossrefs

Row products of A095684.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Weighted sum is A029931.
- Necklaces are A065609.
- Sum is A070939.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Lyndon words are A275692.
- Distinct parts are counted by A334028.

Programs

  • Mathematica
    Table[Times @@ FactorInteger[#][[All, -1]] &[Times @@ Map[#1^#2 & @@ # &, FactorInteger[#] /. {p_, e_} /; e == 1 :> {Times @@ Prime@ Range@ PrimePi@ p, e}] &[Times @@ Prime@ Flatten@ Position[#, 1] &@ Reverse@ IntegerDigits[n, 2]]], {n, 0, 93}] (* Michael De Vlieger, Mar 18 2017 *)
  • PARI
    A005361(n) = factorback(factor(n)[, 2]); \\ From A005361
    A034386(n) = prod(i=1, primepi(n), prime(i));
    A108951(n) = { my(f=factor(n)); prod(i=1, #f~, A034386(f[i, 1])^f[i, 2]) };  \\ From A108951
    A019565(n) = {my(j,v); factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ From A019565
    A283477(n) = A108951(A019565(n));
    A284001(n) = A005361(A283477(n));
    
  • Scheme
    (define (A284001 n) (A005361 (A283477 n)))

Formula

a(n) = A005361(A283477(n)).
a(n) = A003963(A057335(n)). - Gus Wiseman, Apr 26 2020
a(n) = A284005(A053645(n)) for n > 0 with a(0) = 1. - Mikhail Kurkov, Jun 05 2021 [verification needed]

A296975 Number of aperiodic normal sequences of length n.

Original entry on oeis.org

1, 2, 12, 72, 540, 4668, 47292, 545760, 7087248, 102247020, 1622632572, 28091562840, 526858348380, 10641342923148, 230283190977300, 5315654681435520, 130370767029135900, 3385534663249753392, 92801587319328411132, 2677687796244281955480, 81124824998504073834516
Offset: 1

Views

Author

Gus Wiseman, Dec 22 2017

Keywords

Comments

A finite sequence is normal if it spans an initial interval of positive integers. It is aperiodic if every cyclic rotation is different.

Examples

			The a(3) = 12 aperiodic normal sequences are 112, 121, 122, 123, 132, 211, 212, 213, 221, 231, 312, 321.
The 15 non-aperiodic normal sequences of length 6 are: 111111, 112112, 121121, 121212, 122122, 123123, 132132, 211211, 212121, 212212, 213213, 221221, 231231, 312312, 321321.
		

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n,MoebiusMu[n/#]*Sum[k!*StirlingS2[#,k],{k,#}]&],{n,25}]
  • PARI
    \\ here b(n) is A000670.
    b(n)={polcoef(serlaplace(1/(2-exp(x+O(x*x^n)))),n)}
    a(n)={sumdiv(n, d, moebius(d)*b(n/d))} \\ Andrew Howroyd, Aug 29 2018

Formula

a(n) = n * A060223(n) = Sum_{d|n} mu(d) * A000670(n/d).

A350355 Numbers k such that the k-th composition in standard order is up/down.

Original entry on oeis.org

0, 1, 2, 4, 6, 8, 12, 13, 16, 20, 24, 25, 32, 40, 41, 48, 49, 50, 54, 64, 72, 80, 81, 82, 96, 97, 98, 102, 108, 109, 128, 144, 145, 160, 161, 162, 166, 192, 193, 194, 196, 198, 204, 205, 216, 217, 256, 272, 288, 289, 290, 320, 321, 322, 324, 326, 332, 333, 384
Offset: 1

Views

Author

Gus Wiseman, Jan 15 2022

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
A composition is up/down if it is alternately strictly increasing and strictly decreasing, starting with an increase. For example, the partition (3,2,2,2,1) has no up/down permutations, even though it does have the anti-run permutation (2,3,2,1,2).

Examples

			The terms together with the corresponding compositions begin:
   0: ()
   1: (1)
   2: (2)
   4: (3)
   6: (1,2)
   8: (4)
  12: (1,3)
  13: (1,2,1)
  16: (5)
  20: (2,3)
  24: (1,4)
  25: (1,3,1)
  32: (6)
  40: (2,4)
  41: (2,3,1)
  48: (1,5)
  49: (1,4,1)
  50: (1,3,2)
  54: (1,2,1,2)
		

Crossrefs

The case of permutations is counted by A000111.
These compositions are counted by A025048, down/up A025049.
The strict case is counted by A129838, undirected A349054.
The weak version is counted by A129852, down/up A129853.
The version for anti-runs is A333489, a superset, complement A348612.
This is the up/down case of A345167, counted by A025047.
Counting patterns of this type gives A350354.
The down/up version is A350356.
A001250 counts alternating permutations, complement A348615.
A003242 counts anti-run compositions.
A011782 counts compositions, unordered A000041.
A345192 counts non-alternating compositions, ranked by A345168.
A349052 counts weakly alternating compositions, complement A349053.
A349057 ranks non-weakly alternating compositions.
Statistics of standard compositions:
- Length is A000120.
- Sum is A070939.
- Heinz number is A333219.
- Number of maximal anti-runs is A333381.
- Number of distinct parts is A334028.
Classes of standard compositions:
- Partitions are A114994, strict A333256.
- Multisets are A225620, strict A333255.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Patterns are A333217.

Programs

  • Mathematica
    updoQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]>y[[m+1]],y[[m]]
    				

Formula

A350356 Numbers k such that the k-th composition in standard order is down/up.

Original entry on oeis.org

0, 1, 2, 4, 5, 8, 9, 16, 17, 18, 22, 32, 33, 34, 38, 44, 45, 64, 65, 66, 68, 70, 76, 77, 88, 89, 128, 129, 130, 132, 134, 140, 141, 148, 152, 153, 176, 177, 178, 182, 256, 257, 258, 260, 262, 264, 268, 269, 276, 280, 281, 296, 297, 304, 305, 306, 310, 352, 353
Offset: 1

Views

Author

Gus Wiseman, Jan 15 2022

Keywords

Comments

The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
A composition is down/up if it is alternately strictly increasing and strictly decreasing, starting with a decrease. For example, the partition (3,2,2,2,1) has no down/up permutations, even though it does have the anti-run permutation (2,1,2,3,2).

Examples

			The terms together with the corresponding compositions begin:
   0: ()
   1: (1)
   2: (2)
   4: (3)
   5: (2,1)
   8: (4)
   9: (3,1)
  16: (5)
  17: (4,1)
  18: (3,2)
  22: (2,1,2)
  32: (6)
  33: (5,1)
  34: (4,2)
  38: (3,1,2)
  44: (2,1,3)
  45: (2,1,2,1)
		

Crossrefs

The case of permutations is counted by A000111.
These compositions are counted by A025049, up/down A025048.
The strict case is counted by A129838, undirected A349054.
The weak version is counted by A129853, up/down A129852.
The version for anti-runs is A333489, a superset, complement A348612.
This is the down/up case of A345167, counted by A025047.
Counting patterns of this type gives A350354.
The up/down version is A350355.
A001250 counts alternating permutations, complement A348615.
A003242 counts anti-run compositions.
A011782 counts compositions, unordered A000041.
A345192 counts non-alternating compositions, ranked by A345168.
A349052 counts weakly alternating compositions, complement A349053.
A349057 ranks non-weakly alternating compositions.
Statistics of standard compositions:
- Length is A000120.
- Sum is A070939.
- Heinz number is A333219.
- Number of maximal anti-runs is A333381.
- Number of distinct parts is A334028.
Classes of standard compositions:
- Partitions are A114994, strict A333256.
- Multisets are A225620, strict A333255.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Patterns are A333217.

Programs

  • Mathematica
    doupQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]y[[m+1]]],{m,1,Length[y]-1}];
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],doupQ[stc[#]]&]

Formula

A096299 List of strings in lexicographic order with property that for the 2^(m-1) strings of length m, the first entry is 1, the second distinct entry (reading from left to right) is 2, the third distinct entry is 3, etc.

Original entry on oeis.org

1, 11, 12, 111, 112, 122, 123, 1111, 1112, 1122, 1123, 1222, 1223, 1233, 1234, 11111, 11112, 11122, 11123, 11222, 11223, 11233, 11234, 12222, 12223, 12233, 12234, 12333, 12334, 12344, 12345, 111111, 111112, 111122, 111123, 111222, 111223
Offset: 1

Views

Author

N. J. A. Sloane, Jun 25 2004

Keywords

Examples

			The 8 strings of length 4 are 1111, 1112, 1122, 1123, 1222, 1223, 1233, 1234.
		

Crossrefs

See A095684 for a better version. Different from A110382.

Programs

  • PARI
    f(n, k) = sum(j=0, k-1, 1 + log(hammingweight(n\(2^j)))\log(10));
    a(n) = sum(k=0, log(n)\log(2), hammingweight(n\(2^k))*10^f(n,k)); \\ Michel Marcus, May 09 2019

Extensions

More terms from John W. Layman, Oct 07 2004

A333942 Number of multiset partitions of a multiset whose multiplicities are the parts of the n-th composition in standard order.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 4, 5, 5, 7, 9, 11, 7, 11, 11, 15, 7, 12, 16, 21, 16, 26, 26, 36, 12, 21, 26, 36, 21, 36, 36, 52, 11, 19, 29, 38, 31, 52, 52, 74, 29, 52, 66, 92, 52, 92, 92, 135, 19, 38, 52, 74, 52, 92, 92, 135, 38, 74, 92, 135, 74, 135, 135, 203, 15, 30, 47
Offset: 0

Views

Author

Gus Wiseman, Apr 16 2020

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n. The k-th composition in standard order (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The a(1) = 1 through a(11) = 11 multiset partitions:
  {1}  {11}    {12}    {111}      {112}      {122}      {123}
       {1}{1}  {1}{2}  {1}{11}    {1}{12}    {1}{22}    {1}{23}
                       {1}{1}{1}  {2}{11}    {2}{12}    {2}{13}
                                  {1}{1}{2}  {1}{2}{2}  {3}{12}
                                                        {1}{2}{3}
  {1111}        {1112}        {1122}        {1123}
  {1}{111}      {1}{112}      {1}{122}      {1}{123}
  {11}{11}      {11}{12}      {11}{22}      {11}{23}
  {1}{1}{11}    {2}{111}      {12}{12}      {12}{13}
  {1}{1}{1}{1}  {1}{1}{12}    {2}{112}      {2}{113}
                {1}{2}{11}    {1}{1}{22}    {3}{112}
                {1}{1}{1}{2}  {1}{2}{12}    {1}{1}{23}
                              {2}{2}{11}    {1}{2}{13}
                              {1}{1}{2}{2}  {1}{3}{12}
                                            {2}{3}{11}
                                            {1}{1}{2}{3}
		

Crossrefs

The described multiset has A000120 distinct parts.
The sum of the described multiset is A029931.
Multisets of compositions are A034691.
The described multiset is a row of A095684.
Combinatory separations of normal multisets are A269134.
The product of the described multiset is A284001.
The version for prime indices is A318284.
The version counting combinatory separations is A334030.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Sum is A070939.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Length of Lyndon factorization is A329312.
- Dealings are counted by A333939.
- Distinct parts are counted by A334028.
- Length of co-Lyndon factorization is A334029.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    ptnToNorm[y_]:=Join@@Table[ConstantArray[i,y[[i]]],{i,Length[y]}];
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[facs[Times@@Prime/@ptnToNorm[stc[n]]]],{n,0,30}]

Formula

a(n) = A001055(A057335(n)).

A296976 List of normal Lyndon sequences ordered first by length and then reverse-lexicographically, where a finite sequence is normal if it spans an initial interval of positive integers.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 1, 2, 3, 1, 2, 2, 1, 1, 2, 1, 4, 3, 2, 1, 4, 2, 3, 1, 3, 4, 2, 1, 3, 3, 2, 1, 3, 2, 4, 1, 3, 2, 3, 1, 3, 2, 2, 1, 2, 4, 3, 1, 2, 3, 4, 1, 2, 3, 3, 1, 2, 3, 2, 1, 2, 2, 3, 1, 2, 2, 2, 1, 2, 1, 3, 1, 1, 3, 2, 1, 1, 2, 3, 1, 1, 2, 2, 1, 1, 1, 2
Offset: 1

Views

Author

Gus Wiseman, Dec 22 2017

Keywords

Comments

Row n is formed by A060223(n) sequences and has length A296975(n).

Examples

			Triangle of normal Lyndon sequences begins:
1,
12,
132,123,122,112,
1432,1423,1342,1332,1324,1323,1322,1243,1234,1233,1232,1223,1222,1213,1132,1123,1122,1112.
		

Crossrefs

Programs

  • Mathematica
    LyndonQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And]&&Array[RotateRight[q,#]&,Length[q],1,UnsameQ];
    normseqs[n_]:=Union@@Permutations/@Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1];
    Table[Select[Reverse@normseqs@n,LyndonQ],{n,5}]

A296977 List of normal Lyndon sequences ordered first by length and then lexicographically, where a finite sequence is normal if it spans an initial interval of positive integers.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 3, 1, 3, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 3, 1, 1, 3, 2, 1, 2, 1, 3, 1, 2, 2, 2, 1, 2, 2, 3, 1, 2, 3, 2, 1, 2, 3, 3, 1, 2, 3, 4, 1, 2, 4, 3, 1, 3, 2, 2, 1, 3, 2, 3, 1, 3, 2, 4, 1, 3, 3, 2, 1, 3, 4, 2, 1, 4, 2, 3, 1, 4, 3, 2
Offset: 1

Views

Author

Gus Wiseman, Dec 22 2017

Keywords

Comments

Row n is formed by A060223(n) sequences and has length A296975(n).

Examples

			Triangle of normal Lyndon sequences begins:
1,
12,
112,122,123,132,
1112,1122,1123,1132,1213,1222,1223,1232,1233,1234,1243,1322,1323,1324,1332,1342,1423,1432.
		

Crossrefs

Programs

  • Mathematica
    LyndonQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And]&&Array[RotateRight[q,#]&,Length[q],1,UnsameQ];
    normseqs[n_]:=Union@@Permutations/@Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1];
    Table[Select[normseqs[n],LyndonQ],{n,5}]

A296978 List of normal sequences ordered first by length and then lexicographically, where a finite sequence is normal if it spans an initial interval of positive integers.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 3, 1, 3, 2, 2, 1, 1, 2, 1, 2, 2, 1, 3, 2, 2, 1, 2, 3, 1, 3, 1, 2, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 3, 1, 1, 3, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 2, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Dec 22 2017

Keywords

Examples

			Triangle of normal sequences begins:
1,
11,12,21,
111,112,121,122,123,132,211,212,213,221,231,312,321.
		

Crossrefs

Programs

  • Mathematica
    normseqs[n_]:=Union@@Permutations/@Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1];
    Array[normseqs,5,1,Join]

Formula

Row n is formed by A000670(n) sequences and has total length n * A000670(n).
Showing 1-10 of 11 results. Next