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.

A382876 Number of ways to permute the prime indices of n so that the run-sums are all different.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Apr 12 2025

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, sum A056239.
A run in a sequence is a constant consecutive subsequence. The run-sums of a sequence are obtained by splitting it into maximal runs and taking their sums. See A353932 for run-sums of standard compositions.

Examples

			For n = 12, none of the permutations (1,1,2), (1,2,1), (2,1,1) has distinct run-sums, so a(12) = 0.
The prime indices of 36 are {1,1,2,2}, and we have permutations: (1,1,2,2), (2,2,1,1), so a(36) = 2.
For n = 90 we have:
  (1,2,2,3)
  (1,3,2,2)
  (2,2,1,3)
  (2,2,3,1)
  (3,1,2,2)
  (3,2,2,1)
So a(90) = 6. The 6 missing permutations are: (1,2,3,2), (2,1,2,3), (2,1,3,2), (2,3,1,2), (2,3,2,1), (3,2,1,2).
		

Crossrefs

Positions of 1 are A000961.
Compositions of this type are counted by A353850, ranked by A353852.
Positions of 0 appear to be A381636, for equal run-sums A383100.
For run-lengths instead of sums we have A382771, equal A382857 (zeros A382879).
For equal instead of distinct run-sums we have A382877.
A044813 lists numbers whose binary expansion has distinct run-lengths.
A056239 adds up prime indices, row sums of A112798.
A304442 counts compositions with equal run-sums, complement A382076.
A329739 counts compositions with distinct run-lengths, ranks A351596.
A353837 counts partitions with distinct run-sums, ranks A353838.
A353847 gives composition run-sum transformation, for partitions A353832.
A353932 lists run-sums of standard compositions.

Programs

  • Mathematica
    Table[Length[Select[Permutations[PrimePi /@ Join@@ConstantArray@@@FactorInteger[n]], UnsameQ@@Total/@Split[#]&]],{n,100}]