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.

A335452 Number of separations (Carlitz compositions or anti-runs) of the prime indices of n.

Original entry on oeis.org

1, 1, 1, 0, 1, 2, 1, 0, 0, 2, 1, 1, 1, 2, 2, 0, 1, 1, 1, 1, 2, 2, 1, 0, 0, 2, 0, 1, 1, 6, 1, 0, 2, 2, 2, 2, 1, 2, 2, 0, 1, 6, 1, 1, 1, 2, 1, 0, 0, 1, 2, 1, 1, 0, 2, 0, 2, 2, 1, 6, 1, 2, 1, 0, 2, 6, 1, 1, 2, 6, 1, 1, 1, 2, 1, 1, 2, 6, 1, 0, 0, 2, 1, 6, 2, 2, 2
Offset: 1

Views

Author

Gus Wiseman, Jun 21 2020

Keywords

Comments

The first term that is not a factorial number is a(180) = 12.
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.
A separation (or Carlitz composition) of a multiset is a permutation with no adjacent equal parts.
a(n) depends only on the prime signature of n. - Andrew Howroyd, Feb 03 2021

Examples

			The a(n) separations for n = 2, 6, 30, 180:
  (1)  (12)  (123)  (12123)
       (21)  (132)  (12132)
             (213)  (12312)
             (231)  (12321)
             (312)  (13212)
             (321)  (21213)
                    (21231)
                    (21312)
                    (21321)
                    (23121)
                    (31212)
                    (32121)
		

Crossrefs

Separations are counted by A003242 and ranked by A333489.
Patterns are counted by A000670 and ranked by A333217.
Permutations of prime indices are counted by A008480.
Inseparable partitions are counted by A325535 and ranked by A335448.

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,100}]
  • PARI
    F(i, j, r, t) = {sum(k=max(0, i-j), min(min(i,t), (i-j+t)\2), binomial(i, k)*binomial(r-i+1, t+i-j-2*k)*binomial(t-1, k-i+j))}
    count(sig)={my(s=vecsum(sig), r=0, v=[1]); for(p=1, #sig, my(t=sig[p]); v=vector(s-r-t+1, j, sum(i=1, #v, v[i]*F(i-1, j-1, r, t))); r += t); v[1]}
    a(n)={count(factor(n)[,2])} \\ Andrew Howroyd, Feb 03 2021