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-5 of 5 results.

A356862 Numbers with a unique largest prime exponent.

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, 31, 32, 37, 40, 41, 43, 44, 45, 47, 48, 49, 50, 52, 53, 54, 56, 59, 60, 61, 63, 64, 67, 68, 71, 72, 73, 75, 76, 79, 80, 81, 83, 84, 88, 89, 90, 92, 96, 97, 98, 99, 101, 103, 104
Offset: 1

Views

Author

Jens Ahlström, Sep 01 2022

Keywords

Comments

If the prime factorization of k has a unique largest exponent, then k is a term.
Numbers whose multiset of prime factors (with multiplicity) has a unique mode. - Gus Wiseman, May 12 2023
Disjoint union of A246655 and A376250. The asymptotic density of this sequence, 0.3660366524547281232052..., is equal to the density of A376250 since the prime powers have a zero density. - Amiram Eldar, Sep 17 2024

Examples

			Prime powers (A246655) are in the sequence, since they have only one prime exponent in their prime factorization, hence a unique largest exponent.
144 is in the sequence, since 144 = 2^4 * 3^2 and there is the unique largest exponent 4.
225 is not in the sequence, since 225 = 3^2 * 5^2 and the largest exponent 2 is not unique, but rather it is the exponent of both the prime factor 3 and of the prime factor 5.
		

Crossrefs

Subsequence of A319161 (which has additional terms 1, 180, 252, 300, 396, 450, 468, ...).
For factors instead of exponents we have A102750.
For smallest instead of largest we have A359178, counted by A362610.
The complement is A362605, counted by A362607.
The complement for co-mode is A362606, counted by A362609.
Partitions of this type are counted by A362608.
These are the positions of 1's in A362611, for co-modes A362613.
A001221 is the number of prime exponents, sum A001222.
A027746 lists prime factors, A112798 indices, A124010 exponents.
A362614 counts partitions by number of modes, A362615 co-modes.

Programs

  • Mathematica
    Select[Range[2, 100], Count[(e = FactorInteger[#][[;; , 2]]), Max[e]] == 1 &] (* Amiram Eldar, Sep 01 2022 *)
  • PARI
    isok(k) = if (k>1, my(f=factor(k), m=vecmax(f[,2]), w=select(x->(f[x,2] == m), [1..#f~])); #w == 1); \\ Michel Marcus, Sep 01 2022
  • Python
    from sympy import factorint
    from collections import Counter
    def ok(k):
        c = Counter(factorint(k)).most_common(2)
        return not (len(c) > 1 and c[0][1] == c[1][1])
    print([k for k in range(2, 105) if ok(k)])
    
  • Python
    from sympy import factorint
    from itertools import count, islice
    def A356862_gen(startvalue=2): # generator of terms >= startvalue
        return filter(lambda n:len(f:=sorted(factorint(n).values(),reverse=True))==1 or f[0]!=f[1],count(max(startvalue,2)))
    A356862_list = list(islice(A356862_gen(),30)) # Chai Wah Wu, Sep 10 2022
    

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
    

A359612 Largest prime factor with minimal exponent in canonical prime factorization of n.

Original entry on oeis.org

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

Views

Author

Jens Ahlström, Jan 06 2023

Keywords

Comments

When inspecting the minimal exponent of the canonical representation of n, a(n) is the largest of those primes, while A067695(n) is the smallest.
On the other hand if the maximal exponent is regarded similarly, A356840(n) is the largest of those primes and A356838(n) is the smallest.
18 is the smallest n, where a(n) differs from A006530(n), since a(18) = 2, while A006530(18) = 3.

Examples

			a(162) = a(2^1 * 3^4) = 2.
a(225) = a(3^2 * 5^2) = 5.
		

Crossrefs

Programs

  • Maple
    a:= n-> (l-> (m-> max(map(i-> i[1], select(y->y[2]=m,
             l))))(min(map(x-> x[2], l))))(ifactors(n)[2]):
    seq(a(n), n=2..75);  # Alois P. Heinz, Jan 25 2023
  • Mathematica
    a[n_] := Module[{f = FactorInteger[n], e, ind}, e = f[[;; , 2]]; ind = Position[e, Min[e]][[-1, 1]]; f[[ind, 1]]]; Array[a, 100, 2] (* Amiram Eldar, Jan 07 2023 *)
  • PARI
    a(n) = my(f=factor(n), e=vecmin(f[,2])); f[vecmax(select(x->(x==e), f[,2], 1)), 1]; \\ Michel Marcus, Jan 26 2023
  • Python
    from sympy import factorint
    def a(n):
        max_factor = 0
        min_exponent = float("inf")
        for p, exponent in factorint(n).items():
            if exponent < min_exponent:
                max_factor = p
                min_exponent = exponent
            elif exponent == min_exponent:
                max_factor = max(max_factor, p)
        return max_factor
    
  • Python
    from sympy import factorint
    def A359612(n): return (f:=list(map(tuple,zip(*sorted(factorint(n).items(),reverse=True)))))[0][f[1].index(min(f[1]))] # Chai Wah Wu, Feb 07 2023
    

A357657 a(n) is a lower bound for the square root of the maximum square with exactly n zeros in its binary representation.

Original entry on oeis.org

1, 0, 181, 45, 362, 1241, 2965685, 5931189, 57804981
Offset: 0

Views

Author

Keywords

Comments

See A357656 for more information.
a(9) >= 66537313397, a(10) >= 10520476455.

Crossrefs

A357656 gives the Hamming weight of the squared terms.

A361650 Irregular triangle read by rows in which the row n lists the prime factors of n having the highest multiplicity.

Original entry on oeis.org

2, 3, 2, 5, 2, 3, 7, 2, 3, 2, 5, 11, 2, 13, 2, 7, 3, 5, 2, 17, 3, 19, 2, 3, 7, 2, 11, 23, 2, 5, 2, 13, 3, 2, 29, 2, 3, 5, 31, 2, 3, 11, 2, 17, 5, 7, 2, 3, 37, 2, 19, 3, 13, 2, 41, 2, 3, 7, 43, 2, 3, 2, 23, 47, 2, 7, 5, 3, 17, 2, 53, 3, 5, 11, 2, 3, 19, 2, 29, 59
Offset: 2

Views

Author

Stefano Spezia, Mar 19 2023

Keywords

Comments

The row n has length A001221(n) iff n is squarefree or a perfect power.

Examples

			The triangle begins:
   2;
   3;
   2;
   5;
   2, 3;
   7;
   2;
   3;
   2, 5;
  11;
   2;
  13;
   2, 7;
   3, 5;
   ...
The 12th row consists of {2} because 12 = 2*2*3, and the prime factor with the highest multiplicity is 2.
The 30th row consists of {2, 3, 5} because 30 = 2*3*5, and the prime factors with the highest multiplicity are 2, 3, and 5.
		

Crossrefs

Cf. A001221, A001222, A027746, A051903, A356838 (1st column), A356840 (rightmost term), A361632, A361633.

Programs

  • Mathematica
    r[n_]:=Commonest[Flatten[Table[#[[1]], {#[[2]]}] & /@ FactorInteger[n]]]; Flatten[Array[r,58,2]]
Showing 1-5 of 5 results.