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 21-23 of 23 results.

A335459 Number of permutations of the prime indices of n! with at least one non-singleton run.

Original entry on oeis.org

0, 0, 0, 0, 4, 18, 102, 786, 3960, 51450, 675570, 10804710, 139674024, 2793377664, 58662908640, 1798893694080, 26985313555200, 782574083010720, 25992638958686400, 857757034323189000, 30021498596590300800, 1563341714743040232000, 64179292280096037844800, 2631350957341279888915200
Offset: 0

Views

Author

Gus Wiseman, Jul 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(4) = 4 and a(5) = 18 permutations:
  (1,1,1,2)  (1,1,1,2,3)
  (1,1,2,1)  (1,1,1,3,2)
  (1,2,1,1)  (1,1,2,1,3)
  (2,1,1,1)  (1,1,2,3,1)
             (1,1,3,1,2)
             (1,1,3,2,1)
             (1,2,1,1,3)
             (1,2,3,1,1)
             (1,3,1,1,2)
             (1,3,2,1,1)
             (2,1,1,1,3)
             (2,1,1,3,1)
             (2,1,3,1,1)
             (2,3,1,1,1)
             (3,1,1,1,2)
             (3,1,1,2,1)
             (3,1,2,1,1)
             (3,2,1,1,1)
		

Crossrefs

The anti-run version is A335407.
Anti-runs are ranked by A333489.
Anti-run compositions are A003242.
Anti-run patterns are A005649.
Permutations of prime indices are A008480.
Permutations of prime indices of n! are A325617.
Anti-run permutations of prime indices are A335452.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Select[Permutations[primeMS[n!]],MatchQ[#,{_,x_,x_,_}]&]],{n,0,10}]
  • PARI
    \\ See A335452 for count.
    a(n)={my(sig=factor(n!)[, 2]); vecsum(sig)!/vecprod([k! | k<-sig]) - count(sig)} \\ Andrew Howroyd, Apr 17 2021

Formula

A008480(n!) = a(n) + A335407(n).

Extensions

a(11)-a(13) from Vaclav Kotesovec, Jul 07 2020
Terms a(14) and beyond from Andrew Howroyd, Apr 17 2021

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).

A209036 Number of permutations of the multiset {1,1,2,2,....,n,n} with exactly two consecutive equal terms.

Original entry on oeis.org

1, 2, 36, 984, 43800, 2868480, 259554960, 31012490880, 4728875800320, 896042510496000, 206523228759724800, 56893926736333209600, 18461230471787348044800, 6968851610446509386803200
Offset: 1

Views

Author

Philippe Gibone, Mar 04 2012

Keywords

Comments

This is a particular case (p = 1) of the more general: a(p,n) = number of permutations of the multiset {1,1,2,2,....,n,n} with exactly p times two consecutive equal terms. The sequence a(0,p) is A114938.

Examples

			a(1,2) = 2, because 1221 and 2112 are the only permutations of {1,1,2,2} where exactly two consecutive terms are equal.
		

Crossrefs

Cf. A114938 (a(0,n)).

Programs

  • C
    for (p = 0; p < 20; p++)
        a[p][0] = 0;
    for (n = 0; n < 20; n++)
        a[0][n] = 0;
    a[1][0] = 1;
    for (n = 0; n < 18; n++)
       for (p = 0; p < 18; p++)
            a[p+1][n + 1] = (2*n - p + 2)*a[p][n] + (2*n - p + 1)*(2*n - p)*a[p+1][n]/2 + p*a[p+1][n] + (p + 1)*(2*n - p)*a[p + 2][n] + (p + 2)*(p + 1)*a[p + 3][n]/2 ;
       for(n = 0; n < 10; n++)
       {
        printf("%d, %ld     ", n, a[2][n]);
        if (n % 5 == 0)
         printf("\n\n");
       }

Formula

a(1,1) = 1; a(p,n+1) = a[p, n + 1] = (2*n - p + 2)*a[p-1, n] + (2*n - p + 1)*(2*n - p)*a[p, n]/2 + p*a[p, n] + (p + 1)*(2*n - p)*a[p + 1, n + (p + 2)*(p + 1)*a[p + 2, n]/2.
Previous Showing 21-23 of 23 results.