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 12 results. Next

A072774 Powers of squarefree numbers.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 21, 22, 23, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 46, 47, 49, 51, 53, 55, 57, 58, 59, 61, 62, 64, 65, 66, 67, 69, 70, 71, 73, 74, 77, 78, 79, 81, 82, 83, 85, 86, 87, 89, 91, 93, 94, 95, 97
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 10 2002

Keywords

Comments

Essentially the same as A062770. - R. J. Mathar, Sep 25 2008
Numbers m such that in canonical prime factorization all prime exponents are identical: A124010(m,k) = A124010(m,1) for k = 2..A000005(m). - Reinhard Zumkeller, Apr 06 2014
Heinz numbers of uniform partitions. An integer partition is uniform if all parts appear with the same multiplicity. The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). - Gus Wiseman, Apr 16 2018

Crossrefs

Complement of A059404.
Cf. A072775, A072776, A072777 (subsequence), A005117, A072778, A124010, A329332 (tabular arrangement), A384667 (characteristic function).
A subsequence of A242414.

Programs

  • Haskell
    import Data.Map (empty, findMin, deleteMin, insert)
    import qualified Data.Map.Lazy as Map (null)
    a072774 n = a072774_list !! (n-1)
    (a072774_list, a072775_list, a072776_list) = unzip3 $
       (1, 1, 1) : f (tail a005117_list) empty where
       f vs'@(v:vs) m
        | Map.null m || xx > v = (v, v, 1) :
                                 f vs (insert (v^2) (v, 2) m)
        | otherwise = (xx, bx, ex) :
                      f vs' (insert (bx*xx) (bx, ex+1) $ deleteMin m)
        where (xx, (bx, ex)) = findMin m
    -- Reinhard Zumkeller, Apr 06 2014
    
  • Maple
    isA := n -> n=1 or is(1 = nops({seq(p[2], p in ifactors(n)[2])})):
    select(isA, [seq(1..97)]);  # Peter Luschny, Jun 10 2025
  • Mathematica
    Select[Range[100], Length[Union[FactorInteger[#][[All, 2]]]] == 1 &] (* Geoffrey Critzer, Mar 30 2015 *)
  • PARI
    is(n)=ispower(n,,&n); issquarefree(n) \\ Charles R Greathouse IV, Oct 16 2015
    
  • Python
    from math import isqrt
    from sympy import mobius, integer_nthroot
    def A072774(n):
        def g(x): return int(sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1)))-1
        def f(x): return n-2+x-sum(g(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length()))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 19 2024

Formula

a(n) = A072775(n)^A072776(n).
Sum_{n>=1} 1/a(n)^s = 1 + Sum_{k>=1} (zeta(k*s)/zeta(2*k*s)-1) for s > 1. - Amiram Eldar, Mar 20 2025
a(n)/n ~ Pi^2/6 (A013661). - Friedjof Tellkamp, Jun 09 2025

A052410 Write n = m^k with m, k integers, k >= 1, then a(n) is the smallest possible choice for m.

Original entry on oeis.org

1, 2, 3, 2, 5, 6, 7, 2, 3, 10, 11, 12, 13, 14, 15, 2, 17, 18, 19, 20, 21, 22, 23, 24, 5, 26, 3, 28, 29, 30, 31, 2, 33, 34, 35, 6, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 7, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 2, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74
Offset: 1

Views

Author

Keywords

Comments

Value of m in m^p = n, where p is the largest possible power (see A052409).
For n > 1, n is a perfect power iff a(n) <> n. - Reinhard Zumkeller, Oct 13 2002
a(n)^A052409(n) = n. - Reinhard Zumkeller, Apr 06 2014
Every integer root of n is a power of a(n). All entries (except 1) belong to A007916. - Gus Wiseman, Sep 11 2017

Crossrefs

Programs

  • Haskell
    a052410 n = product $ zipWith (^)
                          (a027748_row n) (map (`div` (foldl1 gcd es)) es)
                where es = a124010_row n
    -- Reinhard Zumkeller, Jul 15 2012
    
  • Maple
    a:= n-> (l-> (t-> mul(i[1]^(i[2]/t), i=l))(
             igcd(seq(i[2], i=l))))(ifactors(n)[2]):
    seq(a(n), n=1..74);  # Alois P. Heinz, Jul 22 2024
  • Mathematica
    Table[If[n==1, 1, n^(1/(GCD@@(Last/@FactorInteger[n])))], {n, 100}]
  • PARI
    a(n) = if (ispower(n,,&r), r, n); \\ Michel Marcus, Jul 19 2017
    
  • Python
    def upto(n):
        list = [1] + [0] * (n - 1)
        for i in range(2, n + 1):
            if not list[i - 1]:
                j = i
                while j <= n:
                    list[j - 1] = i
                    j *= i
        return list
    # M. Eren Kesim, Jun 03 2021
    
  • Python
    from math import gcd
    from sympy import integer_nthroot, factorint
    def A052410(n): return integer_nthroot(n,gcd(*factorint(n).values()))[0] if n>1 else 1 # Chai Wah Wu, Mar 02 2024

Formula

a(A001597(k)) = A025478(k).
a(n) = A007916(A278028(n,1)). - Gus Wiseman, Sep 11 2017

Extensions

Definition edited (in a complementary form to A052409) by Daniel Forgues, Mar 14 2009
Corrected by Charles R Greathouse IV, Sep 02 2009
Definition edited by N. J. A. Sloane, Sep 03 2010

A367579 Irregular triangle read by rows where row n is the multiset multiplicity kernel (MMK) of the multiset of prime indices of n.

Original entry on oeis.org

1, 2, 1, 3, 1, 1, 4, 1, 2, 1, 1, 5, 1, 2, 6, 1, 1, 2, 2, 1, 7, 1, 2, 8, 1, 3, 2, 2, 1, 1, 9, 1, 2, 3, 1, 1, 2, 1, 4, 10, 1, 1, 1, 11, 1, 2, 2, 1, 1, 3, 3, 1, 1, 12, 1, 1, 2, 2, 1, 3, 13, 1, 1, 1, 14, 1, 5, 2, 3, 1, 1, 15, 1, 2, 4, 1, 3, 2, 2, 1, 6, 16, 1, 2
Offset: 1

Views

Author

Gus Wiseman, Nov 25 2023

Keywords

Comments

Row n = 1 is empty.
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 the multiset multiplicity kernel MMK(m) of a multiset m by the following property, holding for all distinct multiplicities k >= 1. If S is the set of elements of multiplicity k in m, then min(S) has multiplicity |S| in MMK(m). For example, MMK({1,1,2,2,3,4,5}) = {1,1,3,3,3}, and MMK({1,2,3,4,5,5,5,5}) = {1,1,1,1,5}.
Note: I chose the word 'kernel' because, as with A007947 and A304038, MMK(m) is constructed using the same underlying elements as m and has length equal to the number of distinct elements of m. However, it is not necessarily a submultiset of m.

Examples

			The first 45 rows:
     1: {}      16: {1}       31: {11}
     2: {1}     17: {7}       32: {1}
     3: {2}     18: {1,2}     33: {2,2}
     4: {1}     19: {8}       34: {1,1}
     5: {3}     20: {1,3}     35: {3,3}
     6: {1,1}   21: {2,2}     36: {1,1}
     7: {4}     22: {1,1}     37: {12}
     8: {1}     23: {9}       38: {1,1}
     9: {2}     24: {1,2}     39: {2,2}
    10: {1,1}   25: {3}       40: {1,3}
    11: {5}     26: {1,1}     41: {13}
    12: {1,2}   27: {2}       42: {1,1,1}
    13: {6}     28: {1,4}     43: {14}
    14: {1,1}   29: {10}      44: {1,5}
    15: {2,2}   30: {1,1,1}   45: {2,3}
		

Crossrefs

Indices of empty and singleton rows are A000961.
Row lengths are A001221.
Depends only on rootless base A052410, see A007916.
Row minima are A055396.
Rows have A071625 distinct elements.
Indices of constant rows are A072774.
Indices of strict rows are A130091.
Rows have Heinz numbers A367580.
Row sums are A367581.
Row maxima are A367583, opposite A367587.
Index of first row with Heinz number n is A367584.
Sorted row indices of first appearances are A367585.
Indices of rows of the form {1,1,...} are A367586.
Agrees with sorted prime signature at A367683, counted by A367682.
A submultiset of prime indices at A367685, counted by A367684.
A007947 gives squarefree kernel.
A112798 lists prime indices, length A001222, sum A056239, reverse A296150.
A124010 lists prime multiplicities (prime signature), sorted A118914.
A181819 gives prime shadow, with an inverse A181821.
A238747 gives prime metasignature, reversed A353742.
A304038 lists distinct prime indices, length A001221, sum A066328.
A367582 counts partitions by sum of multiset multiplicity kernel.

Programs

  • Mathematica
    mmk[q_]:=With[{mts=Length/@Split[q]}, Sort[Table[Min@@Select[q,Count[q,#]==i&], {i,mts}]]];
    Table[mmk[PrimePi/@Join@@ConstantArray@@@If[n==1, {},FactorInteger[n]]], {n,100}]

Formula

For all positive integers n and k, row n^k is the same as row n.

A367583 Greatest element in row n of A367579 (multiset multiplicity kernel).

Original entry on oeis.org

0, 1, 2, 1, 3, 1, 4, 1, 2, 1, 5, 2, 6, 1, 2, 1, 7, 2, 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, 3, 2, 6, 16, 2, 3, 4, 2, 1, 17, 2, 18, 1, 4, 1, 3, 1, 19, 7, 2, 1, 20, 2, 21, 1, 3, 8, 4, 1, 22, 3, 2, 1
Offset: 1

Views

Author

Gus Wiseman, Nov 28 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 the multiset multiplicity kernel MMK(m) of a multiset m by the following property, holding for all distinct multiplicities k >= 1. If S is the set of elements of multiplicity k in m, then min(S) has multiplicity |S| in MMK(m). For example, MMK({1,1,2,2,3,4,5}) = {1,1,3,3,3}, and MMK({1,2,3,4,5,5,5,5}) = {1,1,1,1,5}.

Examples

			For 450 = 2^1 * 3^2 * 5^2, we have MMK({1,2,2,3,3}) = {1,2,2} so a(450) = 2.
		

Crossrefs

Positions of first appearances are A008578.
Depends only on rootless base A052410, see A007916, A052409.
For minimum instead of maximum element we have A055396.
Row maxima of A367579.
Greatest prime index of A367580.
Positions of 1's are A367586 (powers of even squarefree numbers).
The opposite version is A367587.
A007947 gives squarefree kernel.
A072774 lists powers of squarefree numbers.
A112798 lists prime indices, length A001222, sum A056239, reverse A296150.
A124010 gives prime signature, sorted A118914.
A181819 gives prime shadow, with an inverse A181821.
A238747 gives prime metasignature, reverse A353742.
A304038 lists distinct prime indices, length A001221, sum A066328.
A363486 gives least prime index of greatest exponent.
A363487 gives greatest prime index of greatest exponent.
A364191 gives least prime index of least exponent.
A364192 gives greatest prime index of least exponent.

Programs

  • Mathematica
    mmk[q_]:=With[{mts=Length/@Split[q]},Sort[Table[Min@@Select[q,Count[q,#]==i&],{i,mts}]]];
    Table[If[n==1,0,Max@@mmk[PrimePi/@Join@@ConstantArray@@@If[n==1,{},FactorInteger[n]]]],{n,1,100}]

Formula

a(n) = A061395(A367580(n)).
a(n^k) = a(n) for all positive integers n and k.
If n is a power of a squarefree number, a(n) = A055396(n).

A278029 a(1) = 0; for n > 1, a(n) = k if n is a non-perfect-power, A007916(k); or 0 if n is a perfect power.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Nov 10 2016

Keywords

Crossrefs

Programs

  • Mathematica
    FoldList[Boole[#2 != #1] #2 &, #] &@ Accumulate@ Array[Boole[And[# > 1, CoprimeQ @@ FactorInteger[#][[All, -1]]]] &, 81] (* Michael De Vlieger, Dec 18 2016 *)

Extensions

Name corrected by Peter Munn, Feb 28 2024

A304481 Turn the power-tower for n upside-down.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 32, 26, 27, 28, 29, 30, 31, 25, 33, 34, 35, 64, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 128, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 36, 65, 66, 67
Offset: 1

Views

Author

Gus Wiseman, May 13 2018

Keywords

Comments

This is an involution of the positive integers.
The power-tower for n is defined as follows. Let {c(i)} = A007916 denote the sequence of numbers > 1 which are not perfect powers. Every positive integer n has a unique representation as a tower n = c(x_1)^c(x_2)^c(x_3)^...^c(x_k), where the exponents are nested from the right. Then a(n) = c(x_k)^...^c(x_3)^c(x_2)^c(x_1).

Examples

			The power tower of 81 is 3^2^2, which turned upside-down is 2^2^3 = 256, so a(81) = 256.
		

Crossrefs

Programs

  • Maple
    f:= proc(n,r) local F,a,y;
         if n = 1 then return 1 fi;
         F:= ifactors(n)[2];
         y:= igcd(seq(t[2],t=F));
         if y = 1 then return n^r fi;
         a:= mul(t[1]^(t[2]/y),t=F);
         procname(y,a^r)
    end proc:
    seq(f(n,1),n=1..100); # Robert Israel, May 13 2018
  • Mathematica
    tow[n_]:=If[n==1,{},With[{g=GCD@@FactorInteger[n][[All,2]]},If[g===1,{n},Prepend[tow[g],n^(1/g)]]]];
    Table[Power@@Reverse[tow[n]],{n,100}]

A304491 Last or deepest exponent in the power-tower for n.

Original entry on oeis.org

1, 2, 3, 2, 5, 6, 7, 3, 2, 10, 11, 12, 13, 14, 15, 2, 17, 18, 19, 20, 21, 22, 23, 24, 2, 26, 3, 28, 29, 30, 31, 5, 33, 34, 35, 2, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 2, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 6, 65, 66, 67, 68, 69
Offset: 1

Views

Author

Gus Wiseman, May 13 2018

Keywords

Comments

Let {c(i)} = A007916 denote the sequence of numbers > 1 which are not perfect powers. Every positive integer n has a unique representation as a tower n = c(x_1)^c(x_2)^c(x_3)^...^c(x_k), where the exponents are nested from the right. Then a(n) = c(x_k).

Examples

			We have 16 = 2^2^2, so a(16) = 2.
We have 64 = 2^6, so a(64) = 6.
We have 81 = 3^2^2, so a(81) = 2.
We have 256 = 2^2^3, so a(256) = 3.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=If[n==1,1,With[{g=GCD@@FactorInteger[n][[All,2]]},If[g==1,n,a[g]]]];
    Array[a,100]
  • PARI
    a(n)={my(t=n); while(t, n=t; t=ispower(t)); n} \\ Andrew Howroyd, Aug 26 2018

Formula

a(n) = A007916(A278028(n, A288636(n))).

A304495 Decapitate the power-tower for n, i.e., remove the last (deepest) exponent.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 13 2018

Keywords

Comments

a(1) = 0 by convention.
Let {c(i)} = A007916 denote the sequence of numbers > 1 which are not perfect powers. Every positive integer n has a unique representation as a tower n = c(x_1)^c(x_2)^c(x_3)^...^c(x_k), where the exponents are nested from the right. Then a(n) = c(x_1)^c(x_2)^c(x_3)^...^c(x_{k-1}).

Examples

			We have 64 = 2^6, so a(64) = 2.
We have 216 = 6^3, so a(216) = 6.
We have 256 = 2^2^3, so a(256) = 2^2 = 4.
		

Crossrefs

Programs

  • Mathematica
    tow[n_]:=If[n==1,{},With[{g=GCD@@FactorInteger[n][[All,2]]},If[g===1,{n},Prepend[tow[g],n^(1/g)]]]];
    Table[If[n==1,0,Power@@Most[tow[n]]],{n,100}]
  • PARI
    A304495(n) = if(1==n,0,my(e, r, tow = List([])); while((e = ispower(n,,&r)) > 1, listput(tow, r); n = e;); n = 1; while(length(tow)>0, e = tow[#tow]; listpop(tow); n = e^n;); (n)); \\ Antti Karttunen, Jul 23 2018

Formula

a(m) <> 1 if m is a perfect power (A001597). - Michel Marcus, Jul 23 2018

Extensions

Name edited and more terms from Antti Karttunen, Jul 23 2018

A304492 Position in the sequence of numbers that are not perfect powers (A007916) of the last or deepest exponent in the power-tower for n.

Original entry on oeis.org

1, 2, 3, 2, 4, 5, 6, 3, 2, 7, 8, 9, 10, 11, 12, 2, 13, 14, 15, 16, 17, 18, 19, 20, 2, 21, 3, 22, 23, 24, 25, 4, 26, 27, 28, 2, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 2, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 5, 55, 56, 57, 58, 59, 60
Offset: 1

Views

Author

Gus Wiseman, May 13 2018

Keywords

Comments

Let {c(i)} = A007916 denote the sequence of numbers > 1 which are not perfect powers. Every positive integer n has a unique representation as a tower n = c(x_1)^c(x_2)^c(x_3)^...^c(x_k), where the exponents are nested from the right. Then a(n) = x_k.

Crossrefs

Programs

  • Mathematica
    nn=100;
    a[n_]:=If[n==1,1,With[{g=GCD@@FactorInteger[n][[All,2]]},If[g==1,n,a[g]]]];
    rads=Union[Array[a,nn]];
    Table[a[n],{n,nn}]/.Table[rads[[i]]->i,{i,Length[rads]}]

Formula

a(n) = A278028(n, A288636(n)).

A357310 a(n) is the number of j in the range 1 <= j <= n with the same maximal exponent in prime factorization as n.

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 5, 1, 2, 6, 7, 3, 8, 9, 10, 1, 11, 4, 12, 5, 13, 14, 15, 2, 6, 16, 3, 7, 17, 18, 19, 1, 20, 21, 22, 8, 23, 24, 25, 4, 26, 27, 28, 9, 10, 29, 30, 2, 11, 12, 31, 13, 32, 5, 33, 6, 34, 35, 36, 14, 37, 38, 15, 1, 39, 40, 41, 16, 42, 43, 44, 7, 45, 46, 17, 18, 47, 48, 49, 3
Offset: 1

Views

Author

Ilya Gutkovskiy, Sep 23 2022

Keywords

Crossrefs

Cf. A000079 (positions of 1's), A051903, A058933, A289023.

Programs

  • Maple
    f:= proc(n) option remember; `if`(n=1, 0,
          max(map(i-> i[2], ifactors(n)[2])))
        end:
    b:= proc(n) option remember; `if`(n<1, 0, b(n-1)+x^f(n)) end:
    a:= n-> coeff(b(n), x, f(n)):
    seq(a(n), n=1..80);  # Alois P. Heinz, Sep 23 2022
  • Mathematica
    Table[Length[Select[Range[n], If[# == 1, 0, Max @@ Last /@ FactorInteger[#]] == If[n == 1, 0, Max @@ Last /@ FactorInteger[n]] &]], {n, 1, 80}]
    seq[max_] := Module[{e = Join[{0}, Table[Max @@ FactorInteger[n][[;; , 2]], {n, 2, max}]], c = Table[0, {max}]}, Do[c[[k]] = 1 + Count[e[[1 ;; k - 1]], e[[k]]], {k, 1, max}]; c]; seq[100] (* Amiram Eldar, Jan 05 2024 *)
  • PARI
    lista(nmax) = {my(e = vector(nmax, k, if(k==1, 0, vecmax(factor(k)[,2]))), c); for(k = 1, nmax, c =  1; for(j = 1, k-1, c += (e[j] == e[k])); print1(c, ", "));} \\ Amiram Eldar, Jan 05 2024

Formula

a(n) = |{j <= n : A051903(j) = A051903(n)}|.
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = 1/zeta(2)^2 + Sum_{k>=3} (1/zeta(k+1) - 1/zeta(k))^2 = 0.43029326822775728041... . - Amiram Eldar, Jan 05 2024
Showing 1-10 of 12 results. Next