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

A056823 Number of compositions minus number of partitions: A011782(n) - A000041(n).

Original entry on oeis.org

0, 0, 0, 1, 3, 9, 21, 49, 106, 226, 470, 968, 1971, 3995, 8057, 16208, 32537, 65239, 130687, 261654, 523661, 1047784, 2096150, 4193049, 8387033, 16775258, 33551996, 67105854, 134214010, 268430891, 536865308, 1073734982, 2147475299, 4294957153, 8589922282
Offset: 0

Views

Author

Alford Arnold, Aug 29 2000

Keywords

Comments

Previous name was: Counts members of A056808 by number of factors.
A056808 relates to least prime signatures (cf. A025487)
a(n) is also the number of compositions of n that are not partitions of n. - Omar E. Pol, Jan 31 2009, Oct 14 2013
a(n) is the number of compositions of n into positive parts containing pattern [1,2]. - Bob Selcoe, Jul 08 2014

Examples

			A011782 begins     1 1 2 4 8 16 32 64 128 256 ...;
A000041 begins     1 1 2 3 5  7 11 15  22  30 ...;
so sequence begins 0 0 0 1 3  9 21 49 106 226 ... .
For n = 3 the factorizations are 8=2*2*2, 12=2*2*3, 18=2*3*3 and 30=2*3*5.
a(5) = 9: {[1,1,1,2], [1,1,2,1], [1,1,3], [1,2,1,1], [1,2,2], [1,3,1], [1,4], [2,1,2], [2,3]}. - _Bob Selcoe_, Jul 08 2014
		

Crossrefs

The version for patterns is A002051.
(1,2)-avoiding compositions are just partitions A000041.
The (1,1)-matching version is A261982.
The version for prime indices is A335447.
(1,2)-matching compositions are ranked by A335485.
Patterns matched by compositions are counted by A335456.

Programs

  • Maple
    a:= n-> ceil(2^(n-1))-combinat[numbpart](n):
    seq(a(n), n=0..37);  # Alois P. Heinz, Jan 30 2020
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!GreaterEqual@@#&]],{n,0,10}] (* Gus Wiseman, Jun 24 2020 *)
    a[n_] := If[n == 0, 0, 2^(n-1) - PartitionsP[n]];
    a /@ Range[0, 37] (* Jean-François Alcover, May 23 2021 *)

Formula

a(n) = A011782(n) - A000041(n).
a(n) = 2*a(n-1) + A117989(n-1). - Bob Selcoe, Apr 11 2014
G.f.: (1 - x) / (1 - 2*x) - Product_{k>=1} 1 / (1 - x^k). - Ilya Gutkovskiy, Jan 30 2020

Extensions

More terms from James Sellers, Aug 31 2000
New name from Joerg Arndt, Sep 02 2013

A335485 Numbers k such that the k-th composition in standard order (A066099) is not weakly decreasing.

Original entry on oeis.org

6, 12, 13, 14, 20, 22, 24, 25, 26, 27, 28, 29, 30, 38, 40, 41, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 70, 72, 76, 77, 78, 80, 81, 82, 83, 84, 86, 88, 89, 90, 91, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106
Offset: 1

Views

Author

Gus Wiseman, Jun 18 2020

Keywords

Comments

Also compositions matching the pattern (1,2).
A composition of n is a finite sequence of positive integers summing to n. 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 sequence of terms together with the corresponding compositions begins:
   6: (1,2)
  12: (1,3)
  13: (1,2,1)
  14: (1,1,2)
  20: (2,3)
  22: (2,1,2)
  24: (1,4)
  25: (1,3,1)
  26: (1,2,2)
  27: (1,2,1,1)
  28: (1,1,3)
  29: (1,1,2,1)
  30: (1,1,1,2)
  38: (3,1,2)
  40: (2,4)
		

Crossrefs

The complement A114994 is the avoiding version.
The (2,1)-matching version is A335486.
Patterns matching this pattern are counted by A002051 (by length).
Permutations of prime indices matching this pattern are counted by A335447.
These compositions are counted by A056823 (by sum).
Constant patterns are counted by A000005 and ranked by A272919.
Permutations are counted by A000142 and ranked by A333218.
Patterns are counted by A000670 and ranked by A333217.
Non-unimodal compositions are counted by A115981 and ranked by A335373.
Combinatory separations are counted by A269134.
Patterns matched by standard compositions are counted by A335454.
Minimal patterns avoided by a standard composition are counted by A335465.

Programs

  • Mathematica
    stc[n_]:=Reverse[Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]];
    Select[Range[0,100],MatchQ[stc[#],{_,x_,_,y_,_}/;x
    				

A335486 Numbers k such that the k-th composition in standard order (A066099) is not weakly increasing.

Original entry on oeis.org

5, 9, 11, 13, 17, 18, 19, 21, 22, 23, 25, 27, 29, 33, 34, 35, 37, 38, 39, 41, 43, 44, 45, 46, 47, 49, 50, 51, 53, 54, 55, 57, 59, 61, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 98, 99
Offset: 1

Views

Author

Gus Wiseman, Jun 18 2020

Keywords

Comments

Also compositions matching the pattern (2,1).
A composition of n is a finite sequence of positive integers summing to n. 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 sequence of terms together with the corresponding compositions begins:
   5: (2,1)
   9: (3,1)
  11: (2,1,1)
  13: (1,2,1)
  17: (4,1)
  18: (3,2)
  19: (3,1,1)
  21: (2,2,1)
  22: (2,1,2)
  23: (2,1,1,1)
  25: (1,3,1)
  27: (1,2,1,1)
  29: (1,1,2,1)
  33: (5,1)
  34: (4,2)
  35: (4,1,1)
		

Crossrefs

The complement A225620 is the avoiding version.
The (1,2)-matching version is A335485.
Patterns matching this pattern are counted by A002051 (by length).
Permutations of prime indices matching this pattern are counted by A008480(n) - 1.
These compositions are counted by A056823 (by sum).
Constant patterns are counted by A000005 and ranked by A272919.
Permutations are counted by A000142 and ranked by A333218.
Patterns are counted by A000670 and ranked by A333217.
Non-unimodal compositions are counted by A115981 and ranked by A335373.
Combinatory separations are counted by A269134.
Patterns matched by standard compositions are counted by A335454.
Minimal patterns avoided by a standard composition are counted by A335465.

Programs

  • Mathematica
    stc[n_]:=Reverse[Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]];
    Select[Range[0,100],MatchQ[stc[#],{_,x_,_,y_,_}/;x>y]&]

A241168 Triangle read by rows: T(n,k) (1 <= k <= n) = Steffensen's bracket function [n,n-k].

Original entry on oeis.org

1, 1, 2, 1, 5, 6, 1, 9, 25, 26, 1, 14, 67, 149, 150, 1, 20, 145, 525, 1081, 1082, 1, 27, 275, 1450, 4651, 9365, 9366, 1, 35, 476, 3430, 15421, 47229, 94585, 94586, 1, 44, 770, 7266, 43281, 180894, 545707, 1091669, 1091670, 1, 54, 1182, 14154, 107751, 581280, 2359225, 7087005, 14174521, 14174522
Offset: 1

Views

Author

N. J. A. Sloane, Apr 22 2014

Keywords

Comments

Steffensen's bracket function [n,k] = Sum_{s=k..n-1} Stirling2(n,s+1)*s!/k!.
The numbers are used in numerical integration.

Examples

			Triangle begins:
1,
1, 2,
1, 5, 6,
1, 9, 25, 26,
1, 14, 67, 149, 150,
1, 20, 145, 525, 1081, 1082,
1, 27, 275, 1450, 4651, 9365, 9366,
1, 35, 476, 3430, 15421, 47229, 94585, 94586,
1, 44, 770, 7266, 43281, 180894, 545707, 1091669, 1091670,
...
		

References

  • J. F. Steffensen, On a class of polynomials and their application to actuarial problems, Skandinavisk Aktuarietidskrift, 11 (1928), 75-97.

Crossrefs

Diagonals include A000096, A000629, A002050, A002051, A241169, A241170.

Programs

  • Maple
    with(combinat);
    T:=proc(n,k) add(stirling2(n,s+1)*s!/k!,s=k..n-1); end;
    for n from 1 to 12 do lprint([seq(T(n,n-k),k=1..n)]); od:

A335447 Number of (1,2)-matching permutations of the prime indices of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 1, 0, 0, 2, 0, 2, 1, 1, 0, 3, 0, 1, 0, 2, 0, 5, 0, 0, 1, 1, 1, 5, 0, 1, 1, 3, 0, 5, 0, 2, 2, 1, 0, 4, 0, 2, 1, 2, 0, 3, 1, 3, 1, 1, 0, 11, 0, 1, 2, 0, 1, 5, 0, 2, 1, 5, 0, 9, 0, 1, 2, 2, 1, 5, 0, 4, 0, 1, 0, 11, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Jun 14 2020

Keywords

Comments

Depends only on sorted prime signature (A118914).
Also the number of (2,1)-matching permutations of the prime indices of n.
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
We define a pattern to be a finite sequence covering an initial interval of positive integers. Patterns are counted by A000670. A sequence S is said to match a pattern P if there is a not necessarily contiguous subsequence of S whose parts have the same relative order as P. For example, (3,1,1,3) matches (1,1,2), (2,1,1), and (2,1,2), but avoids (1,2,1), (1,2,2), and (2,2,1).

Examples

			The a(n) permutations for n = 6, 12, 24, 48, 30, 72, 60:
  (12)  (112)  (1112)  (11112)  (123)  (11122)  (1123)
        (121)  (1121)  (11121)  (132)  (11212)  (1132)
               (1211)  (11211)  (213)  (11221)  (1213)
                       (12111)  (231)  (12112)  (1231)
                                (312)  (12121)  (1312)
                                       (12211)  (1321)
                                       (21112)  (2113)
                                       (21121)  (2131)
                                       (21211)  (2311)
                                                (3112)
                                                (3121)
		

Crossrefs

The avoiding version is A000012.
Patterns are counted by A000670.
Positions of zeros are A000961.
(1,2)-matching patterns are counted by A002051.
Permutations of prime indices are counted by A008480.
(1,2)-matching compositions are counted by A056823.
STC-numbers of permutations of prime indices are A333221.
Patterns matched by standard compositions are counted by A335454.
(1,2,1) or (2,1,2)-matching permutations of prime indices are A335460.
(1,2,1) and (2,1,2)-matching permutations of prime indices are A335462.
Dimensions of downsets of standard compositions are A335465.
(1,2)-matching compositions are ranked by A335485.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Select[Permutations[primeMS[n]],!GreaterEqual@@#&]],{n,100}]

Formula

a(n) = A008480(n) - 1.

A294032 Triangle read by rows, T(n, k) = Pochhammer(3, k)*Stirling2(3 + n, 3 + k) for n >= 0 and 0 <= k <= n.

Original entry on oeis.org

1, 6, 3, 25, 30, 12, 90, 195, 180, 60, 301, 1050, 1680, 1260, 360, 966, 5103, 12600, 15960, 10080, 2520, 3025, 23310, 83412, 158760, 166320, 90720, 20160, 9330, 102315, 510300, 1369620, 2116800, 1890000, 907200, 181440
Offset: 0

Views

Author

Peter Luschny, Oct 22 2017

Keywords

Examples

			Triangle starts:
[0]    1
[1]    6,      3
[2]   25,     30,     12
[3]   90,    195,    180,      60
[4]  301,   1050,   1680,    1260,     360
[5]  966,   5103,  12600,   15960,   10080,    2520
[6] 3025,  23310,  83412,  158760,  166320,   90720,  20160
[7] 9330, 102315, 510300, 1369620, 2116800, 1890000, 907200, 181440
		

Crossrefs

T(n, 0) = A000392(n+3), T(n, n) = A001710(n+2).
Row sums A002051(n+3), alternating row sums A000225(n+1).
Cf. A028246 (m=1), A053440 (m=2), this seq. (m=3), A293617 (hub).

Programs

  • Maple
    A294032 := (n, k) -> pochhammer(3, k)*Stirling2(n + 3, k + 3):
    seq(seq(A294032(n, k), k=0..n), n=0..7);
    T := (n, k) -> A293617(3, n, k): seq(seq(T(n, k), k=0..n), n=0..7);
  • Mathematica
    Table[Pochhammer[3, k] StirlingS2[3 + n, 3 + k], {n, 0, 7}, {k, 0, n}] // Flatten (* Michael De Vlieger, Oct 22 2017 *)
  • PARI
    for(n=0,10, for(k=0,n, print1((k+2)!*stirling(n+3,k+3,2)/2, ", "))) \\ G. C. Greubel, Nov 19 2017

Formula

E.g.f.: (1/2)*exp(x)*(2*y + 9*exp(2*x) + y^2+1-11*exp(3*x)*y + 15*y^2*exp(2*x) - 7*y^2*exp(x) - 13*y^2*exp(3*x) + 4*exp(4*x)*y^2 - 8*exp(x) + 24*y*exp(2*x) - 15*y*exp(x))/(1 - y*(exp(x) - 1))^3.
T(n, k) = A293617(3, n, k).

A054255 Triangle T(n,k) (n >= 1, 0<=k<=n) giving number of preferential arrangements of n things beginning with k (transposed, then read by rows).

Original entry on oeis.org

1, 1, 2, 2, 5, 6, 6, 18, 25, 26, 24, 84, 134, 149, 150, 120, 480, 870, 1050, 1081, 1082, 720, 3240, 6600, 8700, 9302, 9365, 9366, 5040, 25200, 57120, 82320, 92526, 94458, 94585, 94586, 40320, 221760, 554400, 871920, 1038744, 1085364, 1091414, 1091669, 1091670
Offset: 1

Views

Author

Eugene McDonnell (Eemcd(AT)aol.com), May 05 2000

Keywords

Comments

Can be generated from Stirling_2 triangle A008277 (cf. A028246, which is intermediate between the two arrays).

Examples

			   1;
   1,  2;
   2,  5,   6;
   6, 18,  25,  26;
  24, 84, 134, 149, 150;
  ...
		

Crossrefs

Row sums give A000670. First 3 rows are A000629, A002050 = A000629 - 1, 2*A002051 = (A000629 - 2^m) (m >= 0).
Cf. A090665 (triangle with rows reversed).

Extensions

More terms from James Sellers, May 05 2000

A375408 Numbers k such that the k-th composition in standard order is not weakly increasing or weakly decreasing.

Original entry on oeis.org

13, 22, 25, 27, 29, 38, 41, 44, 45, 46, 49, 50, 51, 53, 54, 55, 57, 59, 61, 70, 76, 77, 78, 81, 82, 83, 86, 88, 89, 90, 91, 92, 93, 94, 97, 98, 99, 101, 102, 103, 105, 107, 108, 109, 110, 111, 113, 114, 115, 117, 118, 119, 121, 123, 125, 134, 140, 141, 142
Offset: 1

Views

Author

Gus Wiseman, Sep 18 2024

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 and corresponding compositions begin:
  13: (1,2,1)
  22: (2,1,2)
  25: (1,3,1)
  27: (1,2,1,1)
  29: (1,1,2,1)
  38: (3,1,2)
  41: (2,3,1)
  44: (2,1,3)
  45: (2,1,2,1)
  46: (2,1,1,2)
  49: (1,4,1)
  50: (1,3,2)
  51: (1,3,1,1)
  53: (1,2,2,1)
  54: (1,2,1,2)
  55: (1,2,1,1,1)
  57: (1,1,3,1)
  59: (1,1,2,1,1)
		

Crossrefs

The version for run-lengths of compositions is A332833.
Compositions of this type are counted by A332834, complement maybe A329398.
A001523 counts unimodal compositions, ranks too dense.
A011782 counts compositions.
A114994 ranks weakly decreasing compositions, complement A335485.
A115981 counts non-unimodal compositions, ranked by A335373.
A225620 ranks weakly increasing compositions, complement A335486.
A238130, A238279, A333755 count compositions by number of runs.
A332835 counts compositions with weakly incr. or weakly decr. run-lengths.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1).
- Parts are listed by A066099.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Number of max runs: A124765, A124766, A124767, A124768, A124769, A333381.
- Ranks of strict compositions are A233564.
- Ranks of constant compositions are A272919.
- Anti-runs are ranked by A333489, counted by A003242.
- Run-length transform is A333627, sum A070939.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],!LessEqual@@stc[#]&&!GreaterEqual@@stc[#]&]

Formula

Intersection of A335485 and A335486.
Showing 1-8 of 8 results.