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.

A374246 Number of prime factors of n counted with multiplicity (A001222) minus the greatest number of runs possible in a permutation of them (A373957).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 07 2024

Keywords

Comments

a(n) = 0 iff n has separable prime factors (A335433). A multiset is separable iff it has a permutation that is an anti-run (meaning there are no adjacent equal parts).

Examples

			The runs of the 4 permutations of the prime factors of 24 are:
  ((2,2,2),(3))
  ((2,2),(3),(2))
  ((2),(3),(2,2))
  ((3),(2,2,2))
The longest have length 3, so a(24) = 4 - 3 = 1.
		

Crossrefs

Using the minimum instead of maximum number of runs gives A046660.
Positions of first appearances are A151821 (powers of 2 except 2 itself).
Positions of positive terms are A335448, complement A335433.
This is an opposite version of A373957.
The sister-sequence A374247 uses A001221 instead of A001222.
This is the number of zeros at the end of row n of A374252.
A001221 counts distinct prime factors, A001222 with multiplicity.
A008480 counts permutations of prime factors.
A027746 lists prime factors, row-sums A001414.
A027748 is run-compression of prime factors, row-sums A008472.
A304038 is run-compression of prime indices, row-sums A066328.
A374250 maximizes sum of run-compression, for indices A373956.

Programs

  • Mathematica
    prifacs[n_]:=If[n==1,{}, Flatten[ConstantArray@@@FactorInteger[n]]];
    Table[PrimeOmega[n]-Max@@Table[Length[Split[y]], {y,Permutations[prifacs[n]]}],{n,100}]

Formula

a(n) = A001222(n) - A373957(n).