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 41-45 of 45 results.

A106352 Number of compositions of n into 3 parts such that no two adjacent parts are equal.

Original entry on oeis.org

1, 2, 7, 9, 15, 21, 28, 35, 46, 54, 66, 78, 91, 104, 121, 135, 153, 171, 190, 209, 232, 252, 276, 300, 325, 350, 379, 405, 435, 465, 496, 527, 562, 594, 630, 666, 703, 740, 781, 819, 861, 903, 946, 989, 1036, 1080, 1128, 1176, 1225, 1274, 1327, 1377, 1431
Offset: 4

Views

Author

Christian G. Bower, Apr 29 2005

Keywords

Comments

3*a(n) is total number of parts of multiplicity 1 in all compositions of n into 3 parts. - Vladeta Jovovic, Apr 27 2006

Crossrefs

Column 3 of A106351. Cf. A003242.

Programs

  • Mathematica
    Drop[CoefficientList[Series[x^4(1+4x^2-3x^3+4x^4)/((1-x^6)(1-x)^2),{x,0,60}],x],4] (* or *) LinearRecurrence[{1,1,0,-1,-1,1},{1,2,7,9,15,21},60] (* Harvey P. Dale, May 13 2018 *)

Formula

G.f. x^4*(1+4*x^2-3*x^3+4*x^4)/((1-x^6)*(1-x)^2).

A106353 Number of compositions of n into 4 parts such that no two adjacent parts are equal.

Original entry on oeis.org

2, 6, 14, 24, 46, 66, 100, 138, 192, 246, 324, 402, 506, 612, 746, 882, 1054, 1224, 1432, 1644, 1896, 2148, 2448, 2748, 3098, 3450, 3854, 4260, 4726, 5190, 5716, 6246, 6840, 7434, 8100, 8766, 9506, 10248, 11066, 11886, 12790, 13692, 14680, 15672
Offset: 6

Views

Author

Christian G. Bower, Apr 29 2005

Keywords

Crossrefs

Column 4 of A106351. Cf. A003242.

Programs

  • Mathematica
    Drop[CoefficientList[Series[(8x^10+4x^9+6x^8+4x^7+2x^6)/((1-x)(1-x^2)(1-x^3)(1-x^4)),{x,0,60}],x],6] (* or *) LinearRecurrence[{1,1,0,0,-2,0,0,1,1,-1},{2,6,14,24,46,66,100,138,192,246},60] (* Harvey P. Dale, Apr 02 2023 *)

Formula

G.f.: (8*x^10+4*x^9+6*x^8+4*x^7+2*x^6) / ((1-x)*(1-x^2)*(1-x^3)*(1-x^4)).

A106354 Number of compositions of n into 5 parts such that no two adjacent parts are equal.

Original entry on oeis.org

1, 3, 15, 30, 68, 119, 204, 316, 489, 696, 987, 1340, 1801, 2348, 3035, 3833, 4812, 5935, 7273, 8792, 10576, 12576, 14887, 17465, 20401, 23651, 27319, 31349, 35861, 40791, 46260, 52212, 58776, 65881, 73667, 82068, 91225, 101067, 111748, 123185
Offset: 7

Views

Author

Christian G. Bower, Apr 29 2005

Keywords

Crossrefs

Column 5 of A106351. Cf. A003242.

Programs

  • Mathematica
    LinearRecurrence[{1,1,0,0,-1,-1,-1,1,1,1,0,0,-1,-1,1},{1,3,15,30,68,119,204,316,489,696,987,1340,1801,2348,3035},40] (* Harvey P. Dale, Dec 15 2013 *)

Formula

G.f.: -x^7*(16*x^8 +12*x^7 +21*x^6 +22*x^5 +23*x^4 +12*x^3 +11*x^2 +2*x +1) / ((x -1)^5*(x +1)^2*(x^2 +1)*(x^2 +x +1)*(x^4 +x^3 +x^2 +x +1)). [Colin Barker, Feb 13 2013]

A336104 Number of permutations of the prime indices of A000225(n) = 2^n - 1 with at least one non-singleton run.

Original entry on oeis.org

0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 96, 0, 120, 6, 0, 0, 720, 0, 0, 0, 0, 0, 720, 0, 0, 0, 0, 0, 322560, 0, 0, 0, 5040, 0, 4320, 0, 0, 0, 0, 0, 362880, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Sep 03 2020

Keywords

Comments

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.

Examples

			The a(21) = 6 permutations of {4, 4, 31, 68}:
  (4,4,31,68)
  (4,4,68,31)
  (31,4,4,68)
  (31,68,4,4)
  (68,4,4,31)
  (68,31,4,4)
		

Crossrefs

A335432 is the anti-run version.
A335459 is the version for factorial numbers.
A336105 counts all permutations of this multiset.
A336107 is not restricted to predecessors of powers of 2.
A003242 counts anti-run compositions.
A005649 counts anti-run patterns.
A008480 counts permutations of prime indices.
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A333489 ranks anti-run compositions.
A335433 lists numbers whose prime indices have an anti-run permutation.
A335448 lists numbers whose prime indices have no anti-run permutation.
A335452 counts anti-run permutations of prime indices.
A335489 counts strict permutations of prime indices.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Select[Permutations[primeMS[2^n-1]],MatchQ[#,{_,x_,x_,_}]&]],{n,30}]

Formula

a(n) = A336107(2^n - 1).
a(n) = A336105(n) - A335432(n).

A337507 Number of length-n sequences covering an initial interval of positive integers with exactly two maximal anti-runs, or with one pair of adjacent equal parts.

Original entry on oeis.org

0, 0, 1, 4, 24, 176, 1540, 15672, 181916, 2372512, 34348932, 546674120, 9486840748, 178285201008, 3607174453844, 78177409231768, 1806934004612220, 44367502983673664, 1153334584544496676, 31643148872573831016
Offset: 0

Views

Author

Gus Wiseman, Sep 06 2020

Keywords

Comments

An anti-run is a sequence with no adjacent equal parts. For example, the maximal anti-runs in (3,1,1,2,2,2,1) are ((3,1),(1,2),(2),(2,1)). In general, there is one more maximal anti-run than the number of pairs of adjacent equal parts.

Examples

			The a(4) = 24 sequences:
  (2,1,2,2)  (2,1,3,3)  (3,1,2,2)
  (2,2,1,2)  (2,3,3,1)  (3,2,2,1)
  (1,2,2,1)  (3,3,1,2)  (1,1,2,3)
  (2,1,1,2)  (3,3,2,1)  (1,1,3,2)
  (1,1,2,1)  (1,2,2,3)  (2,1,1,3)
  (1,2,1,1)  (1,3,2,2)  (2,3,1,1)
  (1,2,3,3)  (2,2,1,3)  (3,1,1,2)
  (1,3,3,2)  (2,2,3,1)  (3,2,1,1)
		

Crossrefs

A002133 is the version for runs in partitions.
A106357 is the version for compositions.
A337506 has this as column k = 2.
A000670 counts patterns.
A005649 counts anti-run patterns.
A003242 counts anti-run compositions.
A106356 counts compositions by number of maximal anti-runs.
A124762 counts adjacent equal terms in standard compositions.
A124767 counts maximal runs in standard compositions.
A238130/A238279/A333755 count maximal runs in compositions.
A333381 counts maximal anti-runs in standard compositions.
A333382 counts adjacent unequal terms in standard compositions.
A333489 ranks anti-run compositions.
A333769 gives maximal run lengths in standard compositions.
A337565 gives maximal anti-run lengths in standard compositions.

Programs

  • Mathematica
    kv=2;
    allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
    Table[Length[Select[Join@@Permutations/@allnorm[n],Length[Split[#,UnsameQ]]==kv&]],{n,0,6}]

Formula

a(n > 0) = (n - 1)*A005649(n - 2).
Previous Showing 41-45 of 45 results.