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.

Showing 1-10 of 10 results.

A373957 Greatest number of runs in a permutation of the prime factors of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jul 06 2024

Keywords

Comments

If n belongs to A335433 (the separable case), then a(n) = A001222(n). A multiset is separable iff it has a permutation that is an anti-run (meaning there are no adjacent equal parts).

Examples

			The prime factors of 24 are {2,2,2,3}, with permutations (2,2,2,3), (2,2,3,2), (2,3,2,2), (3,2,2,2), with runs:
  ((2,2,2),(3))
  ((2,2),(3),(2))
  ((2),(3),(2,2))
  ((3),(2,2,2))
with lengths (2,3,3,2), with maximum a(24) = 3.
		

Crossrefs

The minimum instead of maximum is A001221.
Positions of 2 are A006881.
Positions of first appearances appear to be A026549.
Positions of 1 are A246655.
The variation A374246 is the difference from bigomega (A001222).
The variation A374247 is the difference with omega (A001221).
This is the last position of a positive term in row n of A374252.
A001221 counts distinct prime factors, A001222 with multiplicity.
A008480 counts permutations of prime factors.
A056239 adds up prime indices, row sums of A112798.
A124767 counts runs in standard compositions, anti-runs A333381.
A304038 is run-compression of prime indices, sums A066328, factors A027748.
A333755 counts compositions by number of runs.
A335433 lists numbers whose prime factors are separable, complement A335448.

Programs

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

Formula

a(n) = A374247(n) - A001221(n).
a(n) = A001222(n) - A374246(n).

A386635 Triangle read by rows where T(n,k) is the number of separable type set partitions of {1..n} into k blocks.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 0, 3, 1, 0, 0, 3, 6, 1, 0, 0, 10, 25, 10, 1, 0, 0, 10, 75, 65, 15, 1, 0, 0, 35, 280, 350, 140, 21, 1, 0, 0, 35, 770, 1645, 1050, 266, 28, 1, 0, 0, 126, 2737, 7686, 6951, 2646, 462, 36, 1, 0, 0, 126, 7455, 32725, 42315, 22827, 5880, 750, 45, 1
Offset: 0

Views

Author

Gus Wiseman, Aug 10 2025

Keywords

Comments

A set partition is of separable type iff the underlying set has a permutation whose adjacent elements always belong to different blocks. Note that this only depends on the sizes of the blocks.
A set partition is also of separable type iff its greatest block size is at most one more than the sum of all its other blocks sizes.
This is different from separable partitions (A325534) and partitions of separable type (A336106).

Examples

			Row n = 4 counts the following set partitions:
  .  .  {{1,2},{3,4}}  {{1},{2},{3,4}}  {{1},{2},{3},{4}}
        {{1,3},{2,4}}  {{1},{2,3},{4}}
        {{1,4},{2,3}}  {{1},{2,4},{3}}
                       {{1,2},{3},{4}}
                       {{1,3},{2},{4}}
                       {{1,4},{2},{3}}
Triangle begins:
    1
    0    1
    0    0    1
    0    0    3    1
    0    0    3    6    1
    0    0   10   25   10    1
    0    0   10   75   65   15    1
    0    0   35  280  350  140   21    1
		

Crossrefs

Column k = 2 appears to be A128015.
For separable partitions we have A386583, sums A325534, ranks A335433.
For inseparable partitions we have A386584, sums A325535, ranks A335448.
For separable type partitions we have A386585, sums A336106, ranks A335127.
For inseparable type partitions we have A386586, sums A386638 or A025065, ranks A335126.
Row sums are A386633.
The complement is counted by A386636, row sums A386634.
A000110 counts set partitions, row sums of A048993.
A000670 counts ordered set partitions.
A003242 and A335452 count anti-runs, ranks A333489, patterns A005649.
A239455 counts Look-and-Say partitions, ranks A351294, conjugate A381432.
A335434 counts separable factorizations, inseparable A333487.
A336103 counts normal separable multisets, inseparable A336102.
A351293 counts non-Look-and-Say partitions, ranks A351295, conjugate A381433.
A386587 counts disjoint families of strict partitions of each prime exponent.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    stnseps[stn_]:=Select[Permutations[Union@@stn],And@@Table[Position[stn,#[[i]]][[1,1]]!=Position[stn,#[[i+1]]][[1,1]],{i,Length[#]-1}]&];
    Table[Length[Select[sps[Range[n]],Length[#]==k&&stnseps[#]!={}&]],{n,0,5},{k,0,n}]

A386636 Triangle read by rows where T(n,k) is the number of inseparable type set partitions of {1..n} into k blocks.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 4, 0, 0, 0, 1, 5, 0, 0, 0, 0, 1, 21, 15, 0, 0, 0, 0, 1, 28, 21, 0, 0, 0, 0, 0, 1, 92, 196, 56, 0, 0, 0, 0, 0, 1, 129, 288, 84, 0, 0, 0, 0, 0, 0, 1, 385, 1875, 1380, 210, 0, 0, 0, 0, 0, 0, 1, 561, 2860, 2145, 330, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Gus Wiseman, Aug 10 2025

Keywords

Comments

A set partition is of inseparable type iff the underlying set has no permutation whose adjacent elements always belong to different blocks. Note that this only depends on the sizes of the blocks.
A set partition is also of inseparable type iff its greatest block size is at least 2 more than the sum of all its other block sizes.
This is different from inseparable partitions (A325535) and partitions of inseparable type (A386638 or A025065).

Examples

			Row n = 6 counts the following set partitions:
  .  {123456}  {1}{23456}  {1}{2}{3456}  .  .  .
               {12}{3456}  {1}{2345}{6}
               {13}{2456}  {1}{2346}{5}
               {14}{2356}  {1}{2356}{4}
               {15}{2346}  {1}{2456}{3}
               {16}{2345}  {1234}{5}{6}
               {1234}{56}  {1235}{4}{6}
               {1235}{46}  {1236}{4}{5}
               {1236}{45}  {1245}{3}{6}
               {1245}{36}  {1246}{3}{5}
               {1246}{35}  {1256}{3}{4}
               {1256}{34}  {1345}{2}{6}
               {1345}{26}  {1346}{2}{5}
               {1346}{25}  {1356}{2}{4}
               {1356}{24}  {1456}{2}{3}
               {1456}{23}
               {12345}{6}
               {12346}{5}
               {12356}{4}
               {12456}{3}
               {13456}{2}
Triangle begins:
    0
    0    0
    0    1    0
    0    1    0    0
    0    1    4    0    0
    0    1    5    0    0    0
    0    1   21   15    0    0    0
    0    1   28   21    0    0    0    0
    0    1   92  196   56    0    0    0    0
    0    1  129  288   84    0    0    0    0    0
    0    1  385 1875 1380  210    0    0    0    0    0
		

Crossrefs

For separable partitions we have A386583, sums A325534, ranks A335433.
For inseparable partitions we have A386584, sums A325535, ranks A335448.
For separable type partitions we have A386585, sums A336106, ranks A335127.
For inseparable type partitions we have A386586, sums A386638 or A025065, ranks A335126.
Row sums are A386634.
The complement is counted by A386635, row sums A386633.
A000110 counts set partitions, row sums of A048993.
A000670 counts ordered set partitions.
A003242 and A335452 count anti-runs, ranks A333489, patterns A005649.
A279790 counts disjoint families on strongly normal multisets.
A335434 counts separable factorizations, inseparable A333487.
A336103 counts normal separable multisets, inseparable A336102.
A386587 counts disjoint families of strict partitions of each prime exponent.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    stnseps[stn_]:=Select[Permutations[Union@@stn],And@@Table[Position[stn,#[[i]]][[1,1]]!=Position[stn,#[[i+1]]][[1,1]],{i,Length[#]-1}]&]
    Table[Length[Select[sps[Range[n]],Length[#]==k&&stnseps[#]=={}&]],{n,0,5},{k,0,n}]

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

A374250 Greatest sum of run-compression of a permutation of the prime factors of n.

Original entry on oeis.org

0, 2, 3, 2, 5, 5, 7, 2, 3, 7, 11, 7, 13, 9, 8, 2, 17, 8, 19, 9, 10, 13, 23, 7, 5, 15, 3, 11, 29, 10, 31, 2, 14, 19, 12, 10, 37, 21, 16, 9, 41, 12, 43, 15, 11, 25, 47, 7, 7, 12, 20, 17, 53, 8, 16, 11, 22, 31, 59, 12, 61, 33, 13, 2, 18, 16, 67, 21, 26, 14, 71
Offset: 1

Views

Author

Gus Wiseman, Jul 09 2024

Keywords

Comments

We define the run-compression of a sequence to be the anti-run obtained by reducing each run of repeated parts to a single part. Alternatively, run-compression removes all parts equal to the part immediately to their left. For example, (1,1,2,2,1) has run-compression (1,2,1).

Examples

			The prime factors of 24 are {2,2,2,3}, with permutations such as (2,2,3,2) whose run-compression sums to 7, so a(24) = 7.
The prime factors of 216 are {2,2,2,3,3,3}, with permutations such as (2,3,2,3,2,3) whose run-compression sums to 15, so a(216) = 15.
		

Crossrefs

Positions of 2 are A000079 (powers of two) except 1.
Positions of 3 are A000244 (powers of three) except 1.
For least instead of greatest sum of run-compression we have A008472.
For prime indices instead of factors we have A373956.
For number of runs instead of sum of run-compression we have A373957.
A001221 counts distinct prime factors, A001222 with multiplicity.
A003242 counts run-compressed compositions, i.e., anti-runs.
A007947 (squarefree kernel) represents run-compression of multisets.
A008480 counts permutations of prime factors (or prime indices).
A056239 adds up prime indices, row sums of A112798.
A116861 counts partitions by sum of run-compression.
A304038 lists run-compression of prime indices, sum A066328.
A335433 lists numbers whose prime indices are separable, complement A335448.
A373949 counts compositions by sum of run-compression, opposite A373951.
A374251 run-compresses standard compositions, sum A373953, rank A373948.

Programs

  • Mathematica
    prifacs[n_]:=If[n==1,{},Flatten[ConstantArray@@@FactorInteger[n]]];
    Table[Max@@(Total[First/@Split[#]]& /@ Permutations[prifacs[n]]),{n,100}]

Formula

a(n) = A001414(n) iff n belongs to A335433 (the separable case, complement A335448), row-sums of A027746.

A374247 The greatest number of runs possible in a permutation of the prime factors of n (A373957) minus the number of distinct such factors (A001221).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Jul 07 2024

Keywords

Comments

If n has separable prime factors (A335433), then a(n) = A001222(n) - A001221(n) = A046660(n). A multiset is separable iff it has an anti-run permutation (meaning there are no adjacent equal parts).

Examples

			The runs of the 6 permutations of the prime factors of 36 are:
  ((2,2),(3,3))
  ((2),(3),(2),(3))
  ((2),(3,3),(2))
  ((3),(2,2),(3))
  ((3),(2),(3),(2))
  ((3,3),(2,2))
The longest length is 4, so a(36) = 4 - 2 = 2.
		

Crossrefs

Positions of first appearances appear to be A026549.
Positions of nonzero terms are A126706, complement A303554.
This is an opposite version of A373957.
The sister-sequence A374246 uses A001222 instead of A001221.
This is the number of nonzero terms in row n of A374252.
A003242 counts run-compressed compositions, i.e., anti-runs.
A008480 counts permutations of prime factors, by number of runs A374252.
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.
A333755 counts compositions by number of runs.
A335433 lists separable numbers, complement A335448.
A374250 maximizes sum of run-compression, for indices A373956.

Programs

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

Formula

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

A374248 Sum of prime indices of n (with multiplicity) minus the greatest possible sum of run-compression of a permutation of the prime indices of n.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 1, 3, 0, 4, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 0, 0, 2, 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, 6, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Jul 10 2024

Keywords

Comments

We define the run-compression of a sequence to be the anti-run obtained by reducing each run of repeated parts to a single part. Alternatively, run-compression removes all parts equal to the part immediately to their left. For example, (1,1,2,2,1) has run-compression (1,2,1).
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 prime indices of 96 are {1,1,1,1,1,2}, with sum 7, and we have permutations such as (1,1,1,1,2,1), with run-compression (1,2,1), with sum 4, so a(96) = 7 - 4 = 3.
		

Crossrefs

Positions of zeros are A335433 (separable).
Positions of positive terms are A335448 (inseparable).
This is an opposite version of A373956, for prime factors A374250.
For prime factors instead of indices we have A374255.
A001221 counts distinct prime factors, A001222 with multiplicity.
A003242 counts run-compressed compositions, i.e., anti-runs.
A007947 (squarefree kernel) represents run-compression of multisets.
A008480 counts permutations of prime factors.
A027746 lists prime factors, row-sums A001414.
A027748 is run-compression of prime factors, row-sums A008472.
A056239 adds up prime indices, row-sums of A112798.
A116861 counts partitions by sum of run-compression.
A304038 is run-compression of prime indices, row-sums A066328.
A373949 counts compositions by sum of run-compression, opposite A373951.
A373957 gives greatest number of runs in a permutation of prime factors.
A374251 run-compresses standard compositions, sum A373953, rank A373948.
A374252 counts permutations of prime factors by number of runs.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Total[prix[n]]-Max@@(Total[First/@Split[#]]&/@Permutations[prix[n]]),{n,100}]

Formula

a(n) = A056239(n) - A373956(n).

A386577 Irregular triangle read by rows where T(n,k) is the number of permutations of the multiset of prime factors of n with k adjacent equal terms.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Aug 01 2025

Keywords

Comments

Are the rows all unimodal?
Counts permutations of prime factors by "inseparability". For "separability" we have A374252.

Examples

			The prime indices of 12 are {1,1,2}, and we have:
- 1 permutation (1,2,1) with 0 adjacent equal parts
- 2 permutations (1,1,2), (2,1,1) with 1 adjacent equal part
- 0 permutations with 2 adjacent equal parts
so row 12 is (1,2,0).
Row 48 counts the following permutations:
  .  .  (1,1,1,2,1)  (1,1,1,1,2)  .
        (1,1,2,1,1)  (2,1,1,1,1)
        (1,2,1,1,1)
Row 144 counts the following permutations:
  .  (1,1,2,1,2,1)  (1,1,1,2,1,2)  (1,1,1,2,2,1)  (1,1,1,1,2,2)  .
     (1,2,1,1,2,1)  (1,1,2,1,1,2)  (1,1,2,2,1,1)  (2,2,1,1,1,1)
     (1,2,1,2,1,1)  (1,2,1,1,1,2)  (1,2,2,1,1,1)
                    (2,1,1,1,2,1)  (2,1,1,1,1,2)
                    (2,1,1,2,1,1)
                    (2,1,2,1,1,1)
Triangle begins:
   1:
   2: 1
   3: 1
   4: 0  1
   6: 1
   6: 2  0
   7: 1
   8: 0  0  1
   9: 0  1
  10: 2  0
  11: 1
  12: 1  2  0
  13: 1
  14: 2  0
  15: 2  0
  16: 0  0  0  1
  17: 1
  18: 1  2  0
  19: 1
  20: 1  2  0
  21: 2  0
  22: 2  0
  23: 1
  24: 0  2  2  0
		

Crossrefs

Row lengths are A001222.
The minima of each row are A010051.
Sorted positions of first appearances appear to be A025487.
Column k = last is A069513.
Row sums are A168324 or A008480.
The number of trailing zeros in each row is A297155 = A001221-1.
Column k = 1 is A335452.
The number of leading zeros in each row is A374246.
For separability instead of inseparability we have A374252.
For a multiset with prescribed multiplicities we have A386578, separability A386579.
A003242 and A335452 count anti-runs, ranks A333489, patterns A005649.
A025065(n - 2) counts partitions of inseparable type, ranks A335126, sums of A386586.
A124762 gives inseparability of standard compositions, separability A333382.
A325534 counts separable multisets, ranks A335433, sums of A386583.
A325535 counts inseparable multisets, ranks A335448, sums of A386584.
A336106 counts partitions of separable type, ranks A335127, sums of A386585.

Programs

  • Mathematica
    Table[Length[Select[Permutations[Flatten[ConstantArray@@@FactorInteger[n]]],Function[q,Length[Select[Range[Length[q]-1],q[[#]]==q[[#+1]]&]]==k]]],{n,30},{k,0,PrimeOmega[n]-1}]

A386579 Number of permutations of row n of A305936 (a multiset whose multiplicities are the prime indices of n) with k adjacent unequal parts.

Original entry on oeis.org

1, 1, 0, 0, 2, 1, 0, 0, 0, 2, 1, 1, 0, 0, 0, 0, 0, 6, 0, 2, 2, 2, 0, 2, 2, 0, 1, 0, 0, 0, 0, 0, 0, 6, 6, 1, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, 0, 2, 3, 4, 1, 0, 0, 0, 24, 1, 0, 0, 0, 0, 0, 0, 0, 0, 6, 12, 12, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 12, 2, 0, 2, 4, 6, 3, 0
Offset: 2

Views

Author

Gus Wiseman, Aug 04 2025

Keywords

Comments

Row 1 is empty, so offset is 2.
Same as A386578 with rows reversed.
This multiset (row n of A305936) is generally not the same as the multiset of prime indices of n. For example, the prime indices of 12 are {1,1,2}, while a multiset whose multiplicities are {1,1,2} is {1,1,2,3}.

Examples

			Row n = 21 counts the following permutations:
  .  111122  111221  111212  112121  .
     221111  112211  112112  121121
             122111  121112  121211
             211112  211121
                     211211
                     212111
Triangle begins:
  .
  1
  1  0
  0  2
  1  0  0
  0  2  1
  1  0  0  0
  0  0  6
  0  2  2  2
  0  2  2  0
  1  0  0  0  0
  0  0  6  6
  1  0  0  0  0  0
  0  2  3  0  0
  0  2  3  4  1
  0  0  0 24
  1  0  0  0  0  0  0
  0  0  6 12 12
  1  0  0  0  0  0  0  0
  0  0  6 12  2
  0  2  4  6  3  0
		

Crossrefs

Column k = 0 is A010051.
Row lengths are A056239.
Row sums are A318762.
Column k = last is A335125.
For prime indices we have A374252, reverse A386577.
Reversing all rows gives A386578.
A003242 and A335452 count anti-runs, ranks A333489, patterns A005649.
A025065(n - 2) counts partitions of inseparable type, ranks A335126, sums of A386586.
A124762 gives inseparability of standard compositions, separability A333382.
A305936 is a multiset whose multiplicities are the prime indices of n.
A325534 counts separable multisets, ranks A335433, sums of A386583.
A325535 counts inseparable multisets, ranks A335448, sums of A386584.
A336106 counts partitions of separable type, ranks A335127, sums of A386585.

Programs

  • Mathematica
    nrmptn[n_]:=Join@@MapIndexed[Table[#2[[1]],{#1}]&,If[n==1,{},Flatten[Cases[FactorInteger[n]//Reverse,{p_,k_}:>Table[PrimePi[p],{k}]]]]];
    ugt[c_,x_]:=Select[Permutations[c],Function[q,Length[Select[Range[Length[q]-1],q[[#]]!=q[[#+1]]&]]==x]];
    Table[Table[Length[ugt[nrmptn[n],k]],{k,0,Length[nrmptn[n]]-1}],{n,30}]

A374255 Sum of prime factors of n (with multiplicity) minus the greatest possible sum of run-compression of a permutation of the prime factors of n.

Original entry on oeis.org

0, 0, 0, 2, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 2, 5, 0, 6, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 4, 7, 0, 0, 0, 0, 3, 0, 2, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 9, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Jul 10 2024

Keywords

Comments

Contains no ones.
We define the run-compression of a sequence to be the anti-run obtained by reducing each run of repeated parts to a single part. Alternatively, run-compression removes all parts equal to the part immediately to their left. For example, (1,1,2,2,1) has run-compression (1,2,1).

Examples

			The prime factors of 96 are {2,2,2,2,2,3}, with sum 13, and we have permutations such as (2,2,2,2,3,2), with run-compression (2,3,2), with sum 7, so a(96) = 13 - 7 = 6.
		

Crossrefs

Positions of first appearances are A280286.
For least instead of greatest sum of run-compression we have A280292.
Positions of zeros are A335433 (separable).
Positions of positive terms are A335448 (inseparable).
For prime indices instead of factors we have A374248.
This is an opposite version of A374250, for prime indices A373956.
A001221 counts distinct prime factors, A001222 with multiplicity.
A003242 counts run-compressed compositions, i.e., anti-runs.
A007947 (squarefree kernel) represents run-compression of multisets.
A008480 counts permutations of prime factors.
A027746 lists prime factors, row-sums A001414.
A027748 is run-compression of prime factors, row-sums A008472.
A056239 adds up prime indices, row sums of A112798.
A116861 counts partitions by sum of run-compression.
A304038 is run-compression of prime indices, row-sums A066328.
A373949 counts compositions by sum of run-compression, opposite A373951.
A373957 gives greatest number of runs in a permutation of prime factors.
A374251 run-compresses standard compositions, sum A373953, rank A373948.
A374252 counts permutations of prime factors by number of runs.

Programs

  • Mathematica
    prifacs[n_]:=If[n==1,{},Flatten[ConstantArray@@@FactorInteger[n]]];
    Table[Total[prifacs[n]]-Max@@(Total[First/@Split[#]]& /@ Permutations[prifacs[n]]),{n,100}]

Formula

a(n) = A001414(n) - A374250(n).
Showing 1-10 of 10 results.