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 11-20 of 42 results. Next

A353866 Heinz numbers of rucksack partitions. Every prime-power divisor has a different sum of prime indices.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75
Offset: 1

Views

Author

Gus Wiseman, Jun 06 2022

Keywords

Comments

The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
In a knapsack partition (A108917, ranked by A299702), every submultiset has a different sum, so these are run-knapsack partitions or rucksack partitions for short.

Examples

			The terms together with their prime indices begin:
    1: {}
    2: {1}
    3: {2}
    4: {1,1}
    5: {3}
    6: {1,2}
    7: {4}
    8: {1,1,1}
    9: {2,2}
   10: {1,3}
   11: {5}
   13: {6}
   14: {1,4}
   15: {2,3}
   16: {1,1,1,1}
The sequence contains 18 because its prime-power divisors {1,2,3,9} have prime indices {}, {1}, {2}, {2,2} with distinct sums {0,1,2,4}. On the other hand, 12 is not in the sequence because {2} and {1,1} have the same sum.
		

Crossrefs

Knapsack partitions are counted by A108917, ranked by A299702.
The strong case is A353838, counted by A353837, complement A353839.
These partitions are counted by A353864.
The complete case is A353867, counted by A353865.
The complement is A354583.
A000041 counts partitions, strict A000009.
A001222 counts prime factors, distinct A001221.
A056239 adds up prime indices, row sums of A112798 and A296150.
A073093 counts prime-power divisors.
A124010 gives prime signature, sorted A118914.
A300273 ranks collapsible partitions, counted by A275870.
A353832 represents the operation of taking run-sums of a partition.
A353836 counts partitions by number of distinct run-sums.
A353852 ranks compositions with all distinct run-sums, counted by A353850.
A353863 counts partitions whose weak run-sums cover an initial interval.

Programs

  • Mathematica
    msubs[s_]:=Join@@@Tuples[Table[Take[t,i],{t,Split[s]},{i,0,Length[t]}]];
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],UnsameQ@@Total/@Select[msubs[primeMS[#]],SameQ@@#&]&]

A353839 Numbers whose prime indices do not have all distinct run-sums.

Original entry on oeis.org

12, 40, 60, 63, 84, 112, 120, 126, 132, 144, 156, 204, 228, 252, 276, 280, 300, 315, 325, 336, 348, 351, 352, 360, 372, 420, 440, 444, 492, 504, 516, 520, 560, 564, 588, 630, 636, 650, 660, 675, 680, 693, 702, 708, 720, 732, 760, 780, 804, 819, 832, 840, 852
Offset: 1

Views

Author

Gus Wiseman, Jun 04 2022

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.
Every sequence can be uniquely split into a sequence of non-overlapping runs. For example, the runs of (2,2,1,1,1,3,2,2) are ((2,2),(1,1,1),(3),(2,2)), with sums (4,3,3,4).

Examples

			The terms together with their prime indices begin:
   12: {1,1,2}
   40: {1,1,1,3}
   60: {1,1,2,3}
   63: {2,2,4}
   84: {1,1,2,4}
  112: {1,1,1,1,4}
  120: {1,1,1,2,3}
  126: {1,2,2,4}
  132: {1,1,2,5}
  144: {1,1,1,1,2,2}
  156: {1,1,2,6}
  204: {1,1,2,7}
  228: {1,1,2,8}
  252: {1,1,2,2,4}
  276: {1,1,2,9}
  280: {1,1,1,3,4}
  300: {1,1,2,3,3}
  315: {2,2,3,4}
		

Crossrefs

For equal run-sums we have A353833, counted by A304442, nonprime A353834.
The complement is A353838, counted by A353837.
A001222 counts prime factors, distinct A001221.
A056239 adds up prime indices, row sums of A112798 and A296150.
A098859 counts partitions with distinct multiplicities, ranked by A130091.
A165413 counts distinct run-sums in binary expansion.
A300273 ranks collapsible partitions, counted by A275870.
A351014 counts distinct runs in standard compositions.
A353832 represents taking run-sums of a partition, compositions A353847.
A353840-A353846 pertain to partition run-sum trajectory.
A353852 ranks compositions with all distinct run-sums, counted by A353850.
A353862 gives the greatest run-sum of prime indices, least A353931.
A353866 ranks rucksack partitions, counted by A353864.

Programs

  • Mathematica
    Select[Range[100],!UnsameQ@@Cases[FactorInteger[#],{p_,k_}:>k*PrimePi[p]]&]

A333750 Number of prime power divisors of n that are <= sqrt(n).

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Apr 03 2020

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local p;
      add(min(padic:-ordp(n,p),floor(1/2*log[p](n))),p=numtheory:-factorset(n))
    end proc:
    map(f, [$1..200]); # Robert Israel, Apr 22 2020
  • Mathematica
    Table[DivisorSum[n, 1 &, # <= Sqrt[n] && PrimePowerQ[#] &], {n, 1, 100}]
    nmax = 100; CoefficientList[Series[Sum[Boole[PrimePowerQ[k]] x^(k^2)/(1 - x^k), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
  • PARI
    a(n) = sumdiv(n, d, (d^2<=n) && isprimepower(d)); \\ Michel Marcus, Apr 03 2020

Formula

G.f.: Sum_{p prime, k>=1} x^(p^(2*k)) / (1 - x^(p^k)).

A353861 Number of distinct weak run-sums of the prime indices of n.

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 2, 4, 3, 3, 2, 3, 2, 3, 3, 5, 2, 4, 2, 4, 3, 3, 2, 4, 3, 3, 4, 4, 2, 4, 2, 6, 3, 3, 3, 4, 2, 3, 3, 4, 2, 4, 2, 4, 4, 3, 2, 5, 3, 4, 3, 4, 2, 5, 3, 5, 3, 3, 2, 4, 2, 3, 3, 7, 3, 4, 2, 4, 3, 4, 2, 5, 2, 3, 4, 4, 3, 4, 2, 5, 5, 3, 2, 4, 3, 3, 3, 5, 2, 5, 3, 4, 3, 3, 3, 6, 2, 4, 4, 5, 2, 4, 2, 5, 4, 3, 2, 5
Offset: 1

Views

Author

Gus Wiseman, May 23 2022

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.
A weak run-sum of a sequence is the sum of any consecutive constant subsequence.

Examples

			The prime indices of 72 are {1,1,1,2,2}, with weak runs {}, {1}, {1,1}, {1,1,1}, {2}, {2,2}, which have sums 0, 1, 2, 3, 2, 4, of which 5 are distinct, so a(72) = 5.
		

Crossrefs

Positions of 2's are A000040.
Positions of first appearances are A000079.
The strong version is A353835, firsts A002110.
Partitions with distinct run-sums are ranked by A353838, counted by A353837.
The strong version for compositions is A353849.
The greatest run-sum is given by A353862, least A353931.
A001222 counts prime factors, distinct A001221.
A005811 counts runs in binary expansion.
A056239 adds up prime indices, row sums of A112798 and A296150.
A124010 gives prime signature, sorted A118914.
A165413 counts distinct run-lengths in binary expansion, sums A353929.
A300273 ranks collapsible partitions, counted by A275870.
A353832 represents taking run-sums of a partition, compositions A353847.
A353833 ranks partitions with all equal run-sums, counted by A304442.
A353840-A353846 pertain to partition run-sum trajectory.
A353852 ranks compositions with all distinct run-sums, counted by A353850.

Programs

  • Mathematica
    Table[Length[Union@@Cases[FactorInteger[n],{p_,k_}:>Range[0,k]*PrimePi[p]]],{n,100}]
  • PARI
    pis_to_runs(n) = { my(runs=List([]), f=factor(n)); for(i=1,#f~,while(f[i,2], listput(runs,primepi(f[i,1])); f[i,2]--)); (runs); };
    A353861(n) = if(1==n,n,my(pruns = pis_to_runs(n), runsum = 0, runsums = List([])); for(i=1,#pruns, listput(runsums, runsum); if((i>1) && pruns[i] == pruns[i-1], runsum += pruns[i], runsum = pruns[i])); listput(runsums, runsum); #Set(runsums)); \\ Antti Karttunen, Jan 20 2025

Extensions

Data section extended to a(108) by Antti Karttunen, Jan 20 2025

A353835 Number of distinct run-sums of the prime indices of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 23 2022

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.
The sequence of runs of a sequence consists of its maximal consecutive constant subsequences when read left-to-right. For example, the runs of (2,2,1,1,1,3,2,2) are (2,2), (1,1,1), (3), (2,2), with sums (4,3,3,4).

Examples

			The prime indices of 3780 are {1,1,2,2,2,3,4}, with distinct run-sums {2,3,4,6}, so a(3780) = 4.
The prime indices of 8820 are {1,1,2,2,3,4,4}, with distinct run-sums {2,3,4,8}, so a(8820) = 4.
The prime indices of 13860 are {1,1,2,2,3,4,5}, with distinct run-sums {2,3,4,5}, so a(13860) = 4.
The prime indices of 92400 are {1,1,1,1,2,3,3,4,5}, with distinct run-sums {2,4,5,6}, so a(92400) = 4.
		

Crossrefs

Positions of first appearances are A002110.
A version for binary expansion is A165413.
Positions of 0's and 1's are A353833, nonprime A353834, counted by A304442.
The case of all distinct run-sums is ranked by A353838, counted by A353837.
The version for compositions is A353849.
The weak version is A353861.
A001222 counts prime factors, distinct A001221.
A005811 counts runs in binary expansion.
A056239 adds up prime indices, row sums of A112798 and A296150.
A124010 gives prime signature, sorted A118914.
A300273 ranks collapsible partitions, counted by A275870.
A351014 counts distinct runs in standard compositions.
A353832 represents the operation of taking run-sums of a partition.
A353840-A353846 pertain to partition run-sum trajectory.
A353862 gives greatest run-sum of prime indices, least A353931.
A353866 ranks rucksack partitions, counted by A353864.

Programs

  • Mathematica
    Table[Length[Union[Cases[If[n==1,{},FactorInteger[n]],{p_,k_}:>PrimePi[p]*k]]],{n,100}]
  • PARI
    pis_to_runs(n) = { my(runs=List([]), f=factor(n)); for(i=1,#f~,while(f[i,2], listput(runs,primepi(f[i,1])); f[i,2]--)); (runs); };
    A353832(n) = if(1==n,n,my(pruns = pis_to_runs(n), m=1, runsum=pruns[1]); for(i=2,#pruns,if(pruns[i] == pruns[i-1], runsum += pruns[i], m *= prime(runsum); runsum = pruns[i])); (m*prime(runsum)));
    A353835(n) = omega(A353832(n)); \\ Antti Karttunen, Jan 20 2025

Formula

a(n) = A001221(A353832(n)). [From formula section of A353832] - Antti Karttunen, Jan 20 2025

Extensions

Data section extended to a(105) by Antti Karttunen, Jan 20 2025

A334996 Irregular triangle read by rows: T(n, m) is the number of ways to distribute Omega(n) objects into precisely m distinct boxes, with no box empty (Omega(n) >= m).

Original entry on oeis.org

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

Views

Author

Stefano Spezia, May 19 2020

Keywords

Comments

n is the specification number for a set of Omega(n) objects (see Theorem 3 in Beekman's article).
The specification number of a multiset is also called its Heinz number. - Gus Wiseman, Aug 25 2020
From Gus Wiseman, Aug 25 2020: (Start)
For n > 1, T(n,k) is also the number of ordered factorizations of n into k factors > 1. For example, row n = 24 counts the following ordered factorizations (the first column is empty):
24 3*8 2*2*6 2*2*2*3
4*6 2*3*4 2*2*3*2
6*4 2*4*3 2*3*2*2
8*3 2*6*2 3*2*2*2
12*2 3*2*4
2*12 3*4*2
4*2*3
4*3*2
6*2*2
For n > 1, T(n,k) is also the number of strict length-k chains of divisors from n to 1. For example, row n = 36 counts the following chains (the first column is empty):
36/1 36/2/1 36/4/2/1 36/12/4/2/1
36/3/1 36/6/2/1 36/12/6/2/1
36/4/1 36/6/3/1 36/12/6/3/1
36/6/1 36/9/3/1 36/18/6/2/1
36/9/1 36/12/2/1 36/18/6/3/1
36/12/1 36/12/3/1 36/18/9/3/1
36/18/1 36/12/4/1
36/12/6/1
36/18/2/1
36/18/3/1
36/18/6/1
36/18/9/1
(End)

Examples

			The triangle T(n, m) begins
  n\m| 0     1     2     3     4
  ---+--------------------------
   1 | 0
   2 | 0     1
   3 | 0     1
   4 | 0     1     1
   5 | 0     1
   6 | 0     1     2
   7 | 0     1
   8 | 0     1     2     1
   9 | 0     1     1
  10 | 0     1     2
  11 | 0     1
  12 | 0     1     4     3
  13 | 0     1
  14 | 0     1     2
  15 | 0     1     2
  16 | 0     1     3     3     1
  ...
From _Gus Wiseman_, Aug 25 2020: (Start)
Row n = 36 counts the following distributions of {1,1,2,2} (the first column is empty):
  {1122}  {1}{122}  {1}{1}{22}  {1}{1}{2}{2}
          {11}{22}  {1}{12}{2}  {1}{2}{1}{2}
          {112}{2}  {11}{2}{2}  {1}{2}{2}{1}
          {12}{12}  {1}{2}{12}  {2}{1}{1}{2}
          {122}{1}  {12}{1}{2}  {2}{1}{2}{1}
          {2}{112}  {1}{22}{1}  {2}{2}{1}{1}
          {22}{11}  {12}{2}{1}
                    {2}{1}{12}
                    {2}{11}{2}
                    {2}{12}{1}
                    {2}{2}{11}
                    {22}{1}{1}
(End)
		

References

  • Richard Beekman, An Introduction to Number-Theoretic Combinatorics, Lulu Press 2017.

Crossrefs

Cf. A000007 (1st column), A000012 (2nd column), A001222 (Omega function), A002033 (row sums shifted left), A007318.
A008480 gives rows ends.
A073093 gives row lengths.
A074206 gives row sums.
A112798 constructs the multiset with each specification number.
A124433 is a signed version.
A251683 is the version with zeros removed.
A334997 is the non-strict version.
A337107 is the restriction to factorial numbers.
A001055 counts factorizations.
A067824 counts strict chains of divisors starting with n.
A122651 counts strict chains of divisors summing to n.
A167865 counts strict chains of divisors > 1 summing to n.
A253249 counts strict chains of divisors.
A337105 counts strict chains of divisors from n! to 1.

Programs

  • Mathematica
    tau[n_,k_]:=If[n==1,1,Product[Binomial[Extract[Extract[FactorInteger[n],i],2]+k,k],{i,1,Length[FactorInteger[n]]}]]; (* A334997 *)
    T[n_,m_]:=Sum[(-1)^k*Binomial[m,k]*tau[n,m-k-1],{k,0,m-1}]; Table[T[n,m],{n,1,30},{m,0,PrimeOmega[n]}]//Flatten
    (* second program *)
    chc[n_]:=If[n==1,{{}},Prepend[Join@@Table[Prepend[#,n]&/@chc[d],{d,DeleteCases[Divisors[n],1|n]}],{n}]]; (* change {{}} to {} if a(1) = 0 *)
    Table[Length[Select[chc[n],Length[#]==k&]],{n,30},{k,0,PrimeOmega[n]}] (* Gus Wiseman, Aug 25 2020 *)
  • PARI
    TT(n, k) = if (k==0, 1, sumdiv(n, d, TT(d, k-1))); \\ A334997
    T(n, m) = sum(k=0, m-1, (-1)^k*binomial(m, k)*TT(n, m-k-1));
    tabf(nn) = {for (n=1, nn, print(vector(bigomega(n)+1, k, T(n, k-1))););} \\ Michel Marcus, May 20 2020

Formula

T(n, m) = Sum_{k=0..m-1} (-1)^k*binomial(m,k)*tau_{m-k-1}(n), where tau_s(r) = A334997(r, s) (see Theorem 3, Lemma 1 and Lemma 2 in Beekman's article).
Conjecture: Sum_{m=0..Omega(n)} T(n, m) = A002033(n-1) for n > 1.
The above conjecture is true since T(n, m) is also the number of ordered factorizations of n into m factors (see Comments) and A002033(n-1) is the number of ordered factorizations of n. - Stefano Spezia, Aug 21 2025

A353834 Nonprime numbers whose prime indices have all equal run-sums.

Original entry on oeis.org

1, 4, 8, 9, 12, 16, 25, 27, 32, 40, 49, 63, 64, 81, 112, 121, 125, 128, 144, 169, 243, 256, 289, 325, 343, 351, 352, 361, 512, 529, 625, 675, 729, 832, 841, 931, 961, 1008, 1024, 1331, 1369, 1539, 1600, 1681, 1728, 1849, 2048, 2176, 2187, 2197, 2209, 2401
Offset: 1

Views

Author

Gus Wiseman, May 26 2022

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.
The sequence of runs of a sequence consists of its maximal consecutive constant subsequences when read left-to-right. For example, the runs of (2,2,1,1,1,3,2,2) are (2,2), (1,1,1), (3), (2,2), with sums (4,3,3,4).

Examples

			The terms together with their prime indices begin:
     1: {}
     4: {1,1}
     8: {1,1,1}
     9: {2,2}
    12: {1,1,2}
    16: {1,1,1,1}
    25: {3,3}
    27: {2,2,2}
    32: {1,1,1,1,1}
    40: {1,1,1,3}
    49: {4,4}
    63: {2,2,4}
    64: {1,1,1,1,1,1}
    81: {2,2,2,2}
   112: {1,1,1,1,4}
   121: {5,5}
   125: {3,3,3}
   128: {1,1,1,1,1,1,1}
For example, 675 is in the sequence because its prime indices {2,2,2,3,3} have run-sums (6,6).
		

Crossrefs

For equal run-lengths we have A072774\A000040, counted by A047966(n)-1.
These partitions are counted by A304442(n) - 1.
These are the nonprime positions of prime powers in A353832.
Including the primes gives A353833.
For distinct run-sums we have A353838\A000040, counted by A353837(n)-1.
For compositions we have A353848\A000079, counted by A353851(n)-1.
A001222 counts prime factors, distinct A001221.
A005811 counts runs in binary expansion, distinct run-lengths A165413.
A056239 adds up prime indices, row sums of A112798 and A296150.
A124010 gives prime signature, sorted A118914.
A300273 ranks collapsible partitions, counted by A275870.
A353835 counts distinct run-sums of prime indices, weak A353861.
A353840-A353846 pertain to partition run-sum trajectory.
A353862 gives greatest run-sum of prime indices, least A353931.
A353866 ranks rucksack partitions, counted by A353864.

Programs

  • Mathematica
    Select[Range[100],!PrimeQ[#]&&SameQ@@Cases[FactorInteger[#],{p_,k_}:>PrimePi[p]*k]&]
  • Python
    from itertools import count, islice
    from sympy import factorint, primepi
    def A353848_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n: n == 1 or (sum((f:=factorint(n)).values()) > 1 and len(set(primepi(p)*e for p, e in f.items())) <= 1), count(max(startvalue,1)))
    A353848_list = list(islice(A353848_gen(),30)) # Chai Wah Wu, May 27 2022

A345957 Number of divisors of n with exactly half as many prime factors as n, counting multiplicity.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Aug 16 2021

Keywords

Comments

These divisors do not necessarily include the central divisors (A207375), and may not themselves be central.

Examples

			The a(n) divisors for selected n:
  n = 1:  6:  36:  60:  210:  840:  900:  1260:  1296:  3600:
     --------------------------------------------------------
      1   2    4    4     6     8    12     12     16     16
          3    6    6    10    12    18     18     24     24
               9   10    14    20    20     20     36     36
                   15    15    28    30     28     54     40
                         21    30    45     30     81     60
                         35    42    50     42            90
                               70    75     45           100
                              105           63           150
                                            70           225
                                           105
		

Crossrefs

The case of powers of 2 is A000035.
Positions of even terms are A000037.
Positions of odd terms are A000290.
Positions of 0's are A026424.
Positions of 1's are A056798.
The rounded version is A096825.
The case of all divisors (not just 2) is A347042.
The smallest of these divisors is A347045 (rounded: A347043).
The greatest of these divisors is A347046 (rounded: A347044).
A000005 counts divisors.
A001221 counts distinct prime factors.
A001222 counts all prime factors.
A056239 adds up prime indices, row sums of A112798.
A207375 lists central divisors.
A325534 counts separable partitions, ranked by A335433.
A325535 counts inseparable partitions, ranked by A335448.
A334997 counts chains of divisors of n by length.

Programs

  • Mathematica
    Table[Length[Select[Divisors[n],PrimeOmega[#]==PrimeOmega[n]/2&]],{n,100}]
  • PARI
    a(n) = my(nb=bigomega(n)); sumdiv(n, d, 2*bigomega(d) == nb); \\ Michel Marcus, Aug 16 2021
    
  • Python
    from sympy import divisors, factorint
    def a(n):
        npf = len(factorint(n, multiple=True))
        divs = divisors(n)
        return sum(2*len(factorint(d, multiple=True)) == npf for d in divs)
    print([a(n) for n in range(1, 88)]) # Michael S. Branicky, Aug 17 2021
    (Python 3.8+)
    from itertools import combinations
    from math import prod, comb
    from sympy import factorint
    def A345957(n):
        if n == 1:
            return 1
        fs = factorint(n)
        elist = list(fs.values())
        q, r = divmod(sum(elist),2)
        k = len(elist)
        if r:
            return 0
        c = 0
        for i in range(k+1):
            m = (-1)**i
            for d in combinations(range(k),i):
                t = k+q-sum(elist[j] for j in d)-i-1
                if t >= 0:
                    c += m*comb(t,k-1)
        return c # Chai Wah Wu, Aug 20 2021
    
  • Python
    from sympy import factorint
    from sympy.utilities.iterables import multiset_combinations
    def A345957(n):
        if n == 1:
            return 1
        fs = factorint(n,multiple=True)
        q, r = divmod(len(fs),2)
        return 0 if r else len(list(multiset_combinations(fs,q))) # Chai Wah Wu, Aug 20 2021

A353863 Number of integer partitions of n whose weak run-sums cover an initial interval of nonnegative integers.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 6, 7, 10, 11, 16, 20, 24, 30, 43, 47, 62, 79, 94, 113, 143, 170, 211, 256, 307, 372, 449, 531, 648, 779, 926, 1100, 1323, 1562, 1864, 2190, 2595, 3053, 3611, 4242, 4977, 5834, 6825, 7973, 9344, 10844, 12641, 14699, 17072, 19822
Offset: 0

Views

Author

Gus Wiseman, Jun 04 2022

Keywords

Comments

A weak run-sum of a sequence is the sum of any consecutive constant subsequence. For example, the weak run-sums of (3,2,2,1) are {1,2,3,4}.
This is a kind of completeness property, cf. A126796.

Examples

			The a(1) = 1 through a(8) = 7 partitions:
  (1)  (11)  (21)   (211)   (311)    (321)     (3211)     (3221)
             (111)  (1111)  (2111)   (3111)    (4111)     (32111)
                            (11111)  (21111)   (22111)    (41111)
                                     (111111)  (31111)    (221111)
                                               (211111)   (311111)
                                               (1111111)  (2111111)
                                                          (11111111)
		

Crossrefs

For parts instead of weak run-sums we have A000009.
For multiplicities instead of weak run-sums we have A317081.
If weak run-sums are distinct we have A353865, the completion of A353864.
A003242 counts anti-run compositions, ranked by A333489, complement A261983.
A005811 counts runs in binary expansion.
A165413 counts distinct run-lengths in binary expansion, sums A353929.
A300273 ranks collapsible partitions, counted by A275870, comps A353860.
A353832 represents taking run-sums of a partition, compositions A353847.
A353833 ranks partitions with all equal run-sums, counted by A304442.
A353835 counts distinct run-sums of prime indices.
A353837 counts partitions with distinct run-sums, ranked by A353838.
A353840-A353846 pertain to partition run-sum trajectory.
A353861 counts distinct weak run-sums of prime indices.
A353932 lists run-sums of standard compositions.

Programs

  • Mathematica
    normQ[m_]:=m=={}||Union[m]==Range[Max[m]];
    msubs[s_]:=Join@@@Tuples[Table[Take[t,i],{t,Split[s]},{i,0,Length[t]}]];
    wkrs[y_]:=Union[Total/@Select[msubs[y],SameQ@@#&]];
    Table[Length[Select[IntegerPartitions[n],normQ[Rest[wkrs[#]]]&]],{n,0,15}]
  • PARI
    \\ isok(p) tests the partition.
    isok(p)={my(b=0, s=0, t=0); for(i=1, #p, if(p[i]<>t, t=p[i]; s=0); s += t; b = bitor(b, 1<<(s-1))); bitand(b,b+1)==0}
    a(n) = {my(r=0); forpart(p=n, r+=isok(p)); r} \\ Andrew Howroyd, Jan 15 2024

Extensions

a(31) onwards from Andrew Howroyd, Jan 15 2024

A353867 Heinz numbers of integer partitions where every partial run (consecutive constant subsequence) has a different sum, and these sums include every integer from 0 to the greatest part.

Original entry on oeis.org

1, 2, 4, 6, 8, 16, 20, 30, 32, 56, 64, 90, 128, 140, 176, 210, 256, 416, 512, 616, 990, 1024, 1088, 1540, 2048, 2288, 2310, 2432, 2970, 4096, 4950, 5888, 7072, 7700, 8008, 8192, 11550, 12870, 14848, 16384, 20020, 20672, 30030, 31744, 32768, 38896, 50490, 55936
Offset: 1

Views

Author

Gus Wiseman, Jun 07 2022

Keywords

Comments

The Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). This gives a bijective correspondence between positive integers and integer partitions.
Related concepts:
- A partition whose submultiset sums cover an initial interval is said to be complete (A126796, ranked by A325781).
- In a knapsack partition (A108917, ranked by A299702), every submultiset has a different sum.
- A complete partition that is also knapsack is said to be perfect (A002033, ranked by A325780).
- A partition whose partial runs have all different sums is said to be rucksack (A353864, ranked by A353866, complement A354583).

Examples

			The terms together with their prime indices begin:
    1: {}
    2: {1}
    4: {1,1}
    6: {1,2}
    8: {1,1,1}
   16: {1,1,1,1}
   20: {1,1,3}
   30: {1,2,3}
   32: {1,1,1,1,1}
   56: {1,1,1,4}
   64: {1,1,1,1,1,1}
   90: {1,2,2,3}
  128: {1,1,1,1,1,1,1}
  140: {1,1,3,4}
  176: {1,1,1,1,5}
  210: {1,2,3,4}
  256: {1,1,1,1,1,1,1,1}
		

Crossrefs

Knapsack partitions are counted by A108917, ranked by A299702.
Complete partitions are counted by A126796, ranked by A325781.
These partitions are counted by A353865.
This is a special case of A353866, counted by A353864, complement A354583.
A001222 counts prime factors, distinct A001221.
A056239 adds up prime indices, row sums of A112798 and A296150.
A073093 counts prime-power divisors.
A124010 gives prime signature, sorted A118914.
A300273 ranks collapsible partitions, counted by A275870.
A353832 represents the operation of taking run-sums of a partition.
A353833 ranks partitions with all equal run-sums, nonprime A353834.
A353836 counts partitions by number of distinct run-sums.
A353852 ranks compositions with all distinct run-sums, counted by A353850.
A353863 counts partitions whose weak run-sums cover an initial interval.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    norqQ[m_]:=Sort[m]==Range[0,Max[m]];
    msubs[s_]:=Join@@@Tuples[Table[Take[t,i],{t,Split[s]},{i,0,Length[t]}]];
    Select[Range[1000],norqQ[Total/@Select[msubs[primeMS[#]],SameQ@@#&]]&]
Previous Showing 11-20 of 42 results. Next