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 31-40 of 45 results. Next

A356838 The smallest of the most common prime factors of n.

Original entry on oeis.org

2, 3, 2, 5, 2, 7, 2, 3, 2, 11, 2, 13, 2, 3, 2, 17, 3, 19, 2, 3, 2, 23, 2, 5, 2, 3, 2, 29, 2, 31, 2, 3, 2, 5, 2, 37, 2, 3, 2, 41, 2, 43, 2, 3, 2, 47, 2, 7, 5, 3, 2, 53, 3, 5, 2, 3, 2, 59, 2, 61, 2, 3, 2, 5, 2, 67, 2, 3, 2, 71, 2, 73, 2, 5, 2, 7, 2, 79, 2, 3, 2, 83, 2, 5, 2, 3, 2, 89
Offset: 2

Views

Author

Jens Ahlström, Aug 31 2022

Keywords

Comments

Pick the prime factors of n with the largest exponent. a(n) is the smallest one of those prime factors.
If the prime factorization of n has a unique largest exponent (A356862), then a(n) = A356840(n). Otherwise a(n) is the smallest of the most common prime factors, while A356840(n) is the largest of them.
a(n) differs from A020639(n) in case the smallest prime factor is not the most common. For example: a(90) = 3, since 90 = 2 * 3^2 * 5 and 3 has the largest exponent. This is different from A020639(90) = 2, since 2 is the smallest prime factor.

Examples

			a(18) = 3, since 18 = 2 * 3^2 and 3 is the most common prime factor.
a(450) = 3, since 450 = 2 * 3^2 * 5^2 and 3 is the smallest of the most common prime factors.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{f = FactorInteger[n], p, e}, p = f[[;; , 1]]; e = f[[;; , 2]]; p[[FirstPosition[e, Max[e]][[1]]]]]; Array[a, 100, 2] (* Amiram Eldar, Sep 01 2022 *)
  • PARI
    a(n) = my(f=factor(n), m=vecmax(f[,2]), w=select(x->(f[x,2] == m), [1..#f~])); vecmin(vector(#w, k, f[w[k], 1])); \\ Michel Marcus, Sep 01 2022
  • Python
    from sympy import factorint
    from collections import Counter
    def a(n):
        return Counter(factorint(n)).most_common(1)[0][0]
    
  • Python
    from sympy import factorint
    def A356838(n): return max(factorint(n).items(),key=lambda x:(x[1],-x[0]))[0] # Chai Wah Wu, Sep 10 2022
    

A362617 Numbers whose prime factorization has both (1) even length, and (2) unequal middle parts.

Original entry on oeis.org

6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 36, 38, 39, 46, 51, 55, 57, 58, 60, 62, 65, 69, 74, 77, 82, 84, 85, 86, 87, 91, 93, 94, 95, 100, 106, 111, 115, 118, 119, 122, 123, 129, 132, 133, 134, 140, 141, 142, 143, 145, 146, 150, 155, 156, 158, 159, 161, 166, 177
Offset: 1

Views

Author

Gus Wiseman, May 10 2023

Keywords

Comments

Also numbers n whose median prime factor is not a prime factor of n, where the median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).

Examples

			The prime factorization of 60 is 2*2*3*5, with middle parts (2,3), so 60 is in the sequence.
		

Crossrefs

Partitions of this type are counted by A238479.
The complement (without 1) is A362618, counted by A238478.
A027746 lists prime factors, A112798 indices, length A001222, sum A056239.
A359893 counts partitions by median.
A359908 ranks partitions with integer median, counted by A325347.
A359912 ranks partitions with non-integer median, counted by A307683.
A362605 ranks partitions with more than one mode, counted by A362607.
A362611 counts modes in prime factorization, triangle version A362614.
A362621 ranks partitions with median equal to maximum, counted by A053263.
A362622 ranks partitions whose maximum is a middle part, counted by A237824.
Contains A006881 and (except for 1) A030229.

Programs

  • Maple
    filter:= proc(n) local F,m;
      F:= sort(map(t -> t[1]$t[2],ifactors(n)[2]));
      m:= nops(F);
      m::even and F[m/2] <> F[m/2+1]
    end proc:
    select(filter, [$2..200]); # Robert Israel, Dec 15 2023
  • Mathematica
    prifacs[n_]:=If[n==1,{},Flatten[ConstantArray@@@FactorInteger[n]]];
    Select[Range[2,100],FreeQ[prifacs[#],Median[prifacs[#]]]&]

A363726 Number of odd-length integer partitions of n with a unique mode.

Original entry on oeis.org

0, 1, 1, 2, 2, 4, 4, 7, 8, 12, 14, 22, 26, 39, 50, 67, 86, 118, 148, 196, 245, 315, 394, 507, 629, 792, 979, 1231, 1503, 1873, 2286, 2814, 3424, 4194, 5073, 6183, 7449, 9014, 10827, 13055, 15603, 18713, 22308, 26631, 31646, 37641, 44559, 52835, 62374, 73671
Offset: 0

Views

Author

Gus Wiseman, Jun 27 2023

Keywords

Comments

A mode in a multiset is an element that appears at least as many times as each of the others. For example, the modes in {a,a,b,b,b,c,d,d,d} are {b,d}.

Examples

			The a(1) = 1 through a(8) = 8 partitions:
  (1)  (2)  (3)    (4)    (5)      (6)      (7)        (8)
            (111)  (211)  (221)    (222)    (322)      (332)
                          (311)    (411)    (331)      (422)
                          (11111)  (21111)  (511)      (611)
                                            (22111)    (22211)
                                            (31111)    (32111)
                                            (1111111)  (41111)
                                                       (2111111)
		

Crossrefs

The constant case is A001227.
Allowing multiple modes gives A027193, ranks A026424.
Allowing any length gives A362608, ranks A356862.
A000041 counts partitions, strict A000009.
A008284 counts partitions by length (or decreasing mean), strict A008289.
A359893 and A359901 count partitions by median.

Programs

  • Mathematica
    modes[ms_]:=Select[Union[ms],Count[ms,#]>=Max@@Length/@Split[ms]&];
    Table[Length[Select[IntegerPartitions[n], Length[modes[#]]==1&&OddQ[Length[#]]&]],{n,30}]

A356840 Largest most common prime factor of n.

Original entry on oeis.org

2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 2, 13, 7, 5, 2, 17, 3, 19, 2, 7, 11, 23, 2, 5, 13, 3, 2, 29, 5, 31, 2, 11, 17, 7, 3, 37, 19, 13, 2, 41, 7, 43, 2, 3, 23, 47, 2, 7, 5, 17, 2, 53, 3, 11, 2, 19, 29, 59, 2, 61, 31, 3, 2, 13, 11, 67, 2, 23, 7, 71, 2, 73, 37, 5, 2, 11, 13, 79, 2, 3, 41, 83
Offset: 2

Views

Author

Jens Ahlström, Aug 31 2022

Keywords

Comments

Pick the prime factors of n with the largest exponent. a(n) is the largest one of those prime factors. If the prime factorization of n has a unique largest exponent, then a(n) = A356838(n). Otherwise, a(n) is the largest of those most common prime factors, while A356838(n) is the smallest of them.

Examples

			a(180) = 3, since 180 = 2^2 * 3^2 * 5 and the largest of the most common prime factor is 3.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{f = FactorInteger[n], p, e}, p = f[[;; , 1]]; e = f[[;; , 2]]; p[[Position[e, Max[e]][[-1,1]]]]]; Array[a, 100, 2] (* Amiram Eldar, Sep 01 2022 *)
  • PARI
    a(n) = my(f=factor(n), m=vecmax(f[,2]), w=select(x->(f[x,2] == m), [1..#f~])); vecmax(vector(#w, k, f[w[k], 1])); \\ Michel Marcus, Sep 01 2022
  • Python
    from sympy import factorint
    from collections import Counter
    def reversed_factors(n):
        return dict(reversed(list(factorint(n).items())))
    def a(n):
        return Counter(reversed_factors(n)).most_common(1)[0][0]
    
  • Python
    from sympy import factorint
    def A356840(n): return max(factorint(n).items(),key=lambda x:(x[1],x[0]))[0] # Chai Wah Wu, Sep 10 2022
    

A362618 Numbers whose prime factorization has either (1) odd length, or (2) equal middle parts.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 16, 17, 18, 19, 20, 23, 24, 25, 27, 28, 29, 30, 31, 32, 37, 40, 41, 42, 43, 44, 45, 47, 48, 49, 50, 52, 53, 54, 56, 59, 61, 63, 64, 66, 67, 68, 70, 71, 72, 73, 75, 76, 78, 79, 80, 81, 83, 88, 89, 90, 92, 96, 97, 98, 99, 101
Offset: 1

Views

Author

Gus Wiseman, May 10 2023

Keywords

Comments

Also numbers n whose median prime factor is a prime factor of n.

Examples

			The prime factorization of 90 is 2*3*3*5, with middle parts (3,3), so 90 is in the sequence.
		

Crossrefs

Partitions of this type are counted by A238478.
The complement (without 1) is A362617, counted by A238479.
A027746 lists prime factors, A112798 indices, length A001222, sum A056239.
A359178 ranks partitions with a unique co-mode, counted by A362610.
A359893 counts partitions by median.
A359908 ranks partitions with integer median, counted by A325347.
A359912 ranks partitions with non-integer median, counted by A307683.
A362611 ranks modes in prime factorization, counted by A362614.
A362621 ranks partitions with median equal to maximum, counted by A053263.
A362622 ranks partitions whose maximum is a middle part, counted by A237824.

Programs

  • Mathematica
    prifacs[n_]:=If[n==1,{},Flatten[ConstantArray@@@FactorInteger[n]]];
    Select[Range[2,100],MemberQ[prifacs[#],Median[prifacs[#]]]&]

A363722 Nonprime numbers whose prime indices satisfy (mean) = (median) = (mode), assuming there is a unique mode.

Original entry on oeis.org

4, 8, 9, 16, 25, 27, 32, 49, 64, 81, 90, 121, 125, 128, 169, 243, 256, 270, 289, 343, 361, 512, 525, 529, 550, 625, 729, 756, 810, 841, 961, 1024, 1331, 1369, 1666, 1681, 1849, 1911, 1950, 2048, 2187, 2197, 2209, 2268, 2401, 2430, 2625, 2695, 2700, 2750, 2809
Offset: 1

Views

Author

Gus Wiseman, Jun 24 2023

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 mode in a multiset is an element that appears at least as many times as each of the others. For example, the modes in {a,a,b,b,b,c,d,d,d} are {b,d}.
The median of a multiset is either the middle part (for odd length), or the average of the two middle parts (for even length).

Examples

			The terms together with their prime indices begin:
     4: {1,1}
     8: {1,1,1}
     9: {2,2}
    16: {1,1,1,1}
    25: {3,3}
    27: {2,2,2}
    32: {1,1,1,1,1}
    49: {4,4}
    64: {1,1,1,1,1,1}
    81: {2,2,2,2}
    90: {1,2,2,3}
   121: {5,5}
   125: {3,3,3}
   128: {1,1,1,1,1,1,1}
		

Crossrefs

These partitions are counted by A363719 - 1 for n > 0.
Including primes gives A363727, counted by A363719.
For prime powers instead of just primes we have A363729, counted by A363728.
For unequal instead of equal we have A363730, counted by A363720.
A112798 lists prime indices, length A001222, sum A056239.
A326567/A326568 gives mean of prime indices.
A356862 ranks partitions with a unique mode, counted by A362608.
A359178 ranks partitions with multiple modes, counted by A362610.
A360005 gives twice the median of prime indices.
A362611 counts modes in prime indices, triangle A362614.
A362613 counts co-modes in prime indices, triangle A362615.
A363486 gives least mode in prime indices, A363487 greatest.
Just two statistics:
- (mean) = (median): A359889, counted by A240219.
- (mean) != (median): A359890, counted by A359894.
- (mean) = (mode): counted by A363723, see A363724, A363731.
- (median) = (mode): counted by A363740.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    modes[ms_]:=Select[Union[ms],Count[ms,#]>=Max@@Length/@Split[ms]&];
    Select[Range[100],!PrimeQ[#]&&{Mean[prix[#]]}=={Median[prix[#]]}==modes[prix[#]]&]

Formula

Complement of A000040 in A363727.
Assuming there is a unique mode, we have A326567(a(n))/A326568(a(n)) = A360005(a(n))/2 = A363486(a(n)) = A363487(a(n)).

A364191 Low co-mode in the multiset of prime indices of n.

Original entry on oeis.org

0, 1, 2, 1, 3, 1, 4, 1, 2, 1, 5, 2, 6, 1, 2, 1, 7, 1, 8, 3, 2, 1, 9, 2, 3, 1, 2, 4, 10, 1, 11, 1, 2, 1, 3, 1, 12, 1, 2, 3, 13, 1, 14, 5, 3, 1, 15, 2, 4, 1, 2, 6, 16, 1, 3, 4, 2, 1, 17, 2, 18, 1, 4, 1, 3, 1, 19, 7, 2, 1, 20, 2, 21, 1, 2, 8, 4, 1, 22, 3, 2, 1
Offset: 1

Views

Author

Gus Wiseman, Jul 16 2023

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.
We define a co-mode in a multiset to be an element that appears at most as many times as each of the others. For example, the co-modes in {a,a,b,b,b,c,c} are {a,c}.
Extending the terminology of A124943, the "low co-mode" in a multiset is the least co-mode.

Examples

			The prime indices of 2100 are {1,1,2,3,3,4}, with co-modes {2,4}, so a(2100) = 2.
		

Crossrefs

For prime factors instead of indices we have A067695, high A359612.
For mode instead of co-mode we have A363486, high A363487, triangle A363952.
For median instead of co-mode we have A363941, high A363942.
Positions of 1's are A364158, counted by A364159.
The high version is A364192 = positions of 1's in A364061.
A112798 lists prime indices, length A001222, sum A056239.
A362611 counts modes in prime indices, triangle A362614.
A362613 counts co-modes in prime indices, triangle A362615.
Ranking and counting partitions:
- A356862 = unique mode, counted by A362608
- A359178 = unique co-mode, counted by A362610
- A362605 = multiple modes, counted by A362607
- A362606 = multiple co-modes, counted by A362609

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    comodes[ms_]:=Select[Union[ms],Count[ms,#]<=Min@@Length/@Split[ms]&];
    Table[If[n==1,0,Min[comodes[prix[n]]]],{n,30}]

Formula

a(n) = A000720(A067695(n)).
A067695(n) = A000040(a(n)).

A364192 High (i.e., greatest) co-mode in the multiset of prime indices of n.

Original entry on oeis.org

0, 1, 2, 1, 3, 2, 4, 1, 2, 3, 5, 2, 6, 4, 3, 1, 7, 1, 8, 3, 4, 5, 9, 2, 3, 6, 2, 4, 10, 3, 11, 1, 5, 7, 4, 2, 12, 8, 6, 3, 13, 4, 14, 5, 3, 9, 15, 2, 4, 1, 7, 6, 16, 1, 5, 4, 8, 10, 17, 3, 18, 11, 4, 1, 6, 5, 19, 7, 9, 4, 20, 2, 21, 12, 2, 8, 5, 6, 22, 3, 2
Offset: 1

Views

Author

Gus Wiseman, Jul 16 2023

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.
We define a co-mode in a multiset to be an element that appears at most as many times as each of the others. For example, the co-modes in {a,a,b,b,b,c,c} are {a,c}.
Extending the terminology of A124943, the "high co-mode" in a multiset is the greatest co-mode.

Examples

			The prime indices of 2100 are {1,1,2,3,3,4}, with co-modes {2,4}, so a(2100) = 4.
		

Crossrefs

For prime factors instead of indices we have A359612, low A067695.
For mode instead of co-mode we have A363487 (triangle A363953), low A363486 (triangle A363952).
The version for median instead of co-mode is A363942, low A363941.
Positions of 1's are A364061, counted by A364062.
The low version is A364191, 1's at A364158 (counted by A364159).
A112798 lists prime indices, length A001222, sum A056239.
A362611 counts modes in prime indices, triangle A362614.
A362613 counts co-modes in prime indices, triangle A362615.
Ranking and counting partitions:
- A356862 = unique mode, counted by A362608
- A359178 = unique co-mode, counted by A362610
- A362605 = multiple modes, counted by A362607
- A362606 = multiple co-modes, counted by A362609

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    comodes[ms_]:=Select[Union[ms],Count[ms,#]<=Min@@Length/@Split[ms]&];
    Table[If[n==1,0,Max[comodes[prix[n]]]],{n,30}]

Formula

a(n) = A000720(A359612(n)).
A359612(n) = A000040(a(n)).

A364160 Numbers whose least prime factor has the greatest exponent.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 16, 17, 19, 20, 23, 24, 25, 27, 28, 29, 31, 32, 37, 40, 41, 43, 44, 45, 47, 48, 49, 52, 53, 56, 59, 60, 61, 63, 64, 67, 68, 71, 72, 73, 76, 79, 80, 81, 83, 84, 88, 89, 92, 96, 97, 99, 101, 103, 104, 107, 109, 112, 113, 116
Offset: 1

Views

Author

Gus Wiseman, Jul 14 2023

Keywords

Comments

First differs from A334298 in having 600 and lacking 180.
Also numbers whose minimum part in prime factorization is a unique mode.
If k is a term, then so are all powers of k. - Robert Israel, Sep 17 2024

Examples

			The prime factorization of 600 is 2*2*2*3*5*5, and 3 > max(1,2), so 600 is in the sequence.
The prime factorization of 180 is 2*2*3*3*5, but 2 <= max(2,1), so 180 is not in the sequence.
The terms together with their prime indices begin:
     1: {}           29: {10}              67: {19}
     2: {1}          31: {11}              68: {1,1,7}
     3: {2}          32: {1,1,1,1,1}       71: {20}
     4: {1,1}        37: {12}              72: {1,1,1,2,2}
     5: {3}          40: {1,1,1,3}         73: {21}
     7: {4}          41: {13}              76: {1,1,8}
     8: {1,1,1}      43: {14}              79: {22}
     9: {2,2}        44: {1,1,5}           80: {1,1,1,1,3}
    11: {5}          45: {2,2,3}           81: {2,2,2,2}
    12: {1,1,2}      47: {15}              83: {23}
    13: {6}          48: {1,1,1,1,2}       84: {1,1,2,4}
    16: {1,1,1,1}    49: {4,4}             88: {1,1,1,5}
    17: {7}          52: {1,1,6}           89: {24}
    19: {8}          53: {16}              92: {1,1,9}
    20: {1,1,3}      56: {1,1,1,4}         96: {1,1,1,1,1,2}
    23: {9}          59: {17}              97: {25}
    24: {1,1,1,2}    60: {1,1,2,3}         99: {2,2,5}
    25: {3,3}        61: {18}             101: {26}
    27: {2,2,2}      63: {2,2,4}          103: {27}
    28: {1,1,4}      64: {1,1,1,1,1,1}    104: {1,1,1,6}
		

Crossrefs

Allowing any unique mode gives A356862, complement A362605.
Allowing any unique co-mode gives A359178, complement A362606.
The even case is A360013, counted by A241131.
For greatest instead of least we have A362616, counted by A362612.
These partitions are counted by A364193.
A027746 lists prime factors (with multiplicity).
A112798 lists prime indices, length A001222, sum A056239.
A362611 counts modes in prime factorization, triangle A362614.
A362613 counts co-modes in prime factorization, triangle A362615.
A363486 gives least mode in prime indices, A363487 greatest.

Programs

  • Maple
    filter:= proc(n) local F,i;
      F:= ifactors(n)[2];
      if nops(F) = 1 then return true fi;
      i:= min[index](F[..,1]);
      andmap(t -> F[t,2] < F[i,2], {$1..nops(F)} minus {i})
    end proc:
    filter(1):= true:
    select(filter, [$1..200]); # Robert Israel, Sep 17 2024
  • Mathematica
    Select[Range[100],First[Last/@FactorInteger[#]] > Max@@Rest[Last/@FactorInteger[#]]&]

A375145 Numbers whose prime factorization has exactly one exponent that is larger than 2.

Original entry on oeis.org

8, 16, 24, 27, 32, 40, 48, 54, 56, 64, 72, 80, 81, 88, 96, 104, 108, 112, 120, 125, 128, 135, 136, 144, 152, 160, 162, 168, 176, 184, 189, 192, 200, 208, 224, 232, 240, 243, 248, 250, 256, 264, 270, 272, 280, 288, 296, 297, 304, 312, 320, 324, 328, 336, 343, 344
Offset: 1

Views

Author

Amiram Eldar, Aug 01 2024

Keywords

Comments

Subsequence of A046099 and first differs from it at n = 35: A046099(35) = 216 = 2^3 * 3^3 is not a term of this sequence.
The asymptotic density of this sequence is (1/zeta(3)) * Sum_{p prime} 1/(p^3-1) = A286229 / A002117 = 0.16148833663564192901... .

Examples

			8 = 2^3 is a term since its prime factorization has exactly one exponent, 3, that is larger than 2.
		

Crossrefs

Programs

  • Mathematica
    q[n_] := Count[FactorInteger[n][[;; , 2]], _?(# > 2 &)] == 1; Select[Range[350], q]
  • PARI
    is(k) = #select(x -> x > 2, factor(k)[, 2]) == 1;
Previous Showing 31-40 of 45 results. Next