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-5 of 5 results.

A025048 Number of up/down (initially ascending) compositions of n.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 7, 11, 16, 26, 41, 64, 100, 158, 247, 389, 612, 960, 1509, 2372, 3727, 5858, 9207, 14468, 22738, 35737, 56164, 88268, 138726, 218024, 342652, 538524, 846358, 1330160, 2090522, 3285526, 5163632, 8115323, 12754288, 20045027, 31503382
Offset: 0

Views

Author

Keywords

Comments

Original name was: Ascending wiggly sums: number of sums adding to n in which terms alternately increase and decrease.
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). - Gus Wiseman, Jan 15 2022

Examples

			From _Gus Wiseman_, Jan 15 2022: (Start)
The a(1) = 1 through a(7) = 11 up/down compositions:
  (1)  (2)  (3)    (4)      (5)      (6)        (7)
            (1,2)  (1,3)    (1,4)    (1,5)      (1,6)
                   (1,2,1)  (2,3)    (2,4)      (2,5)
                            (1,3,1)  (1,3,2)    (3,4)
                                     (1,4,1)    (1,4,2)
                                     (2,3,1)    (1,5,1)
                                     (1,2,1,2)  (2,3,2)
                                                (2,4,1)
                                                (1,2,1,3)
                                                (1,3,1,2)
                                                (1,2,1,2,1)
(End)
		

Crossrefs

The case of permutations is A000111.
The undirected version is A025047, ranked by A345167.
The down/up version is A025049, ranked by A350356.
The strict case is A129838, undirected A349054.
The weak version is A129852, down/up A129853.
The version for patterns is A350354.
These compositions are ranked by A350355.
A001250 counts alternating permutations, complement A348615.
A003242 counts Carlitz compositions, complement A261983.
A011782 counts compositions, unordered A000041.
A325534 counts separable partitions, complement A325535.
A345192 counts non-alternating compositions, ranked by A345168.
A345194 counts alternating patterns, complement A350252.
A349052 counts weakly alternating compositions, complement A349053.

Programs

  • Mathematica
    updoQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]>y[[m+1]],y[[m]]Gus Wiseman, Jan 15 2022 *)

Formula

a(n) = 1 + A025047(n) - A025049(n) = Sum_k A059882(n,k). - Henry Bottomley, Feb 05 2001
a(n) ~ c * d^n, where d = 1.571630806607064114100138865739690782401305155950789062725011227781640624..., c = 0.4408955566119650057730070154620695491718230084159159991449729825619... . - Vaclav Kotesovec, Sep 12 2014

Extensions

Name and offset changed by Gus Wiseman, Jan 15 2022

A025049 Number of down/up (initially descending) compositions of n.

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 6, 9, 14, 23, 35, 55, 87, 136, 214, 337, 528, 830, 1306, 2051, 3223, 5067, 7962, 12512, 19667, 30908, 48574, 76343, 119982, 188565, 296358, 465764, 732006, 1150447, 1808078, 2841627, 4465992, 7018891, 11031101, 17336823, 27247087, 42822355
Offset: 0

Views

Author

Keywords

Comments

Original name was: Descending wiggly sums: number of sums adding to n in which terms alternately decrease and increase.
A composition is down/up if it is alternately strictly decreasing and strictly increasing, 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). - Gus Wiseman, Jan 28 2022

Examples

			From _Gus Wiseman_, Jan 28 2022: (Start)
The a(1) = 1 through a(8) = 14 down/up compositions:
  (1)  (2)  (3)    (4)    (5)      (6)        (7)        (8)
            (2,1)  (3,1)  (3,2)    (4,2)      (4,3)      (5,3)
                          (4,1)    (5,1)      (5,2)      (6,2)
                          (2,1,2)  (2,1,3)    (6,1)      (7,1)
                                   (3,1,2)    (2,1,4)    (2,1,5)
                                   (2,1,2,1)  (3,1,3)    (3,1,4)
                                              (4,1,2)    (3,2,3)
                                              (2,1,3,1)  (4,1,3)
                                              (3,1,2,1)  (5,1,2)
                                                         (2,1,3,2)
                                                         (2,1,4,1)
                                                         (3,1,3,1)
                                                         (4,1,2,1)
                                                         (2,1,2,1,2)
(End)
		

Crossrefs

The case of permutations is A000111.
The undirected version is A025047, ranked by A345167.
The up/down version is A025048, ranked by A350355.
The strict case is A129838, undirected A349054.
The weak version is A129853, up/down A129852.
The version for patterns is A350354.
These compositions are ranked by A350356.
A001250 counts alternating permutations, complement A348615.
A003242 counts Carlitz compositions, complement A261983.
A011782 counts compositions, unordered A000041.
A325534 counts separable partitions, complement A325535.
A345192 counts non-alternating compositions, ranked by A345168.
A345194 counts alternating patterns, complement A350252.
A349052 counts weakly alternating compositions, complement A349053.

Programs

  • Mathematica
    doupQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]y[[m+1]]],{m,1,Length[y]-1}];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],doupQ]],{n,0,15}] (* Gus Wiseman, Jan 28 2022 *)

Formula

a(n) = 1 + A025047(n) - A025048(n) = Sum_{k=1..n} A059883(n,k). - Henry Bottomley, Feb 05 2001

Extensions

a(0)=1 prepended by Alois P. Heinz, Jan 20 2022
Name changed by Gus Wiseman, Jan 28 2022

A351010 Numbers k such that the k-th composition in standard order is a concatenation of twins (x,x).

Original entry on oeis.org

0, 3, 10, 15, 36, 43, 58, 63, 136, 147, 170, 175, 228, 235, 250, 255, 528, 547, 586, 591, 676, 683, 698, 703, 904, 915, 938, 943, 996, 1003, 1018, 1023, 2080, 2115, 2186, 2191, 2340, 2347, 2362, 2367, 2696, 2707, 2730, 2735, 2788, 2795, 2810, 2815, 3600, 3619
Offset: 1

Views

Author

Gus Wiseman, Feb 01 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.

Examples

			The terms together with their binary expansions and the corresponding compositions begin:
    0:         0  ()
    3:        11  (1,1)
   10:      1010  (2,2)
   15:      1111  (1,1,1,1)
   36:    100100  (3,3)
   43:    101011  (2,2,1,1)
   58:    111010  (1,1,2,2)
   63:    111111  (1,1,1,1,1,1)
  136:  10001000  (4,4)
  147:  10010011  (3,3,1,1)
  170:  10101010  (2,2,2,2)
  175:  10101111  (2,2,1,1,1,1)
  228:  11100100  (1,1,3,3)
  235:  11101011  (1,1,2,2,1,1)
  250:  11111010  (1,1,1,1,2,2)
  255:  11111111  (1,1,1,1,1,1,1,1)
		

Crossrefs

The case of twins (binary weight 2) is A000120.
The Heinz numbers of these compositions are given by A000290.
All terms are evil numbers A001969.
Partitions of this type are counted by A035363, any length A351004.
These compositions are counted by A077957(n-2), see also A016116.
The strict case (distinct twins) is A351009, counted by A032020 with 0's.
The anti-run case is A351011, counted by A003242 interspersed with 0's.
A011782 counts integer compositions.
A085207/A085208 represent concatenation of standard compositions.
A333489 ranks anti-runs, complement A348612.
A345167/A350355/A350356 rank alternating compositions.
A351014 counts distinct runs in standard compositions.
Selected statistics of standard compositions:
- Length is A000120.
- Sum is A070939.
- Heinz number is A333219.
- Number of distinct parts is A334028.
Selected classes of standard compositions:
- Partitions are A114994, strict A333256.
- Multisets are A225620, strict A333255.
- Strict compositions are A233564.
- Constant compositions are A272919.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],And@@EvenQ/@Length/@Split[stc[#]]&]

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

A351011 Numbers k such that the k-th composition in standard order has even length and alternately equal and unequal parts, i.e., all run-lengths equal to 2.

Original entry on oeis.org

0, 3, 10, 36, 43, 58, 136, 147, 228, 235, 528, 547, 586, 676, 698, 904, 915, 2080, 2115, 2186, 2347, 2362, 2696, 2707, 2788, 2795, 3600, 3619, 3658, 3748, 3770, 8256, 8323, 8458, 8740, 8747, 8762, 9352, 9444, 9451, 10768, 10787, 10826, 11144, 11155, 14368
Offset: 1

Views

Author

Gus Wiseman, Feb 03 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.

Examples

			The terms together with their binary expansions and standard compositions begin:
    0:           0  ()
    3:          11  (1,1)
   10:        1010  (2,2)
   36:      100100  (3,3)
   43:      101011  (2,2,1,1)
   58:      111010  (1,1,2,2)
  136:    10001000  (4,4)
  147:    10010011  (3,3,1,1)
  228:    11100100  (1,1,3,3)
  235:    11101011  (1,1,2,2,1,1)
  528:  1000010000  (5,5)
  547:  1000100011  (4,4,1,1)
  586:  1001001010  (3,3,2,2)
  676:  1010100100  (2,2,3,3)
  698:  1010111010  (2,2,1,1,2,2)
  904:  1110001000  (1,1,4,4)
  915:  1110010011  (1,1,3,3,1,1)
		

Crossrefs

The case of twins (binary weight 2) is A000120.
All terms are evil numbers A001969.
These compositions are counted by A003242 interspersed with 0's.
Partitions of this type are counted by A035457, any length A351005.
The Heinz numbers of these compositions are A062503.
Taking singles instead of twins gives A333489, complement A348612.
This is the anti-run case of A351010.
The strict case (distinct twins) is A351009, counted by A077957(n-2).
A011782 counts compositions.
A085207/A085208 represent concatenation of standard compositions.
A345167 ranks alternating compositions, counted by A025047.
A350355 ranks up/down compositions, counted by A025048.
A350356 ranks down/up compositions, counted by A025049.
A351014 counts distinct runs in standard compositions.
Selected statistics of standard compositions:
- Length is A000120.
- Sum is A070939.
- Heinz number is A333219.
- Number of distinct parts is A334028.
Selected classes of standard compositions:
- Partitions are A114994, strict A333256.
- Multisets are A225620, strict A333255.
- Strict compositions are A233564.
- Constant compositions are A272919.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,1000],And@@(#==2&)/@Length/@Split[stc[#]]&]
Showing 1-5 of 5 results.