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

A288636 Height of power-tower factorization of n. Row lengths of A278028.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 12 2017

Keywords

Comments

After a(1)=0 this sequence has many terms equal to A089723. It first differs at a(64)=2, A089723(64)=4.
First positions of a(n) = {0, 1, 2, 3, 4} are n = {1, 2, 4, 16, 65536}. - Michael De Vlieger, Nov 24 2017

Crossrefs

Programs

  • Mathematica
    a[n_] := If[n == 1, 0, 1+a[GCD @@ FactorInteger[n][[All, 2]]]];
    Array[a,100]

A007916 Numbers that are not perfect powers.

Original entry on oeis.org

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

Views

Author

R. Muller

Keywords

Comments

From Gus Wiseman, Oct 23 2016: (Start)
There is a 1-to-1 correspondence between integers N >= 2 and sequences a(x_1),a(x_2),...,a(x_k) of terms from this sequence. Every N >= 2 can be written uniquely as a "power tower"
N = a(x_1)^a(x_2)^a(x_3)^...^a(x_k),
where the exponents are to be nested from the right.
Proof: If N is not a perfect power then N = a(x) for some x, and we are done. Otherwise, write N = a(x_1)^M for some M >=2, and repeat the process. QED
Of course, prime numbers also have distinct power towers (see A164336). (End)
These numbers can be computed with a modified Sieve of Eratosthenes: (1) start at n=2; (2) if n is not crossed out, then append n to the sequence and cross out all powers of n; (3) set n = n+1 and go to step 2. - Sam Alexander, Dec 15 2003
These are all numbers such that the multiplicities of the prime factors have no common divisor. The first number in the sequence whose prime multiplicities are not coprime is 180 = 2 * 2 * 3 * 3 * 5. Mathematica: CoprimeQ[2,2,1]->False. - Gus Wiseman, Jan 14 2017

Examples

			Example of the power tower factorizations for the first nine positive integers: 1=1, 2=a(1), 3=a(2), 4=a(1)^a(1), 5=a(3), 6=a(4), 7=a(5), 8=a(1)^a(2), 9=a(2)^a(1). - _Gus Wiseman_, Oct 20 2016
		

Crossrefs

Complement of A001597. Union of A052485 and A052486.
Cf. A153158 (squares of these numbers).
See A277562, A277564, A277576, A277615 for more about the power towers.
A278029 is a left inverse.
Cf. A052409.

Programs

  • Haskell
    a007916 n = a007916_list !! (n-1)
    a007916_list = filter ((== 1) . foldl1 gcd . a124010_row) [2..]
    -- Reinhard Zumkeller, Apr 13 2012
    
  • Magma
    [n : n in [2..1000] | not IsPower(n) ];
    
  • Maple
    See link.
  • Mathematica
    a = {}; Do[If[Apply[GCD, Transpose[FactorInteger[n]][[2]]] == 1, a = Append[a, n]], {n, 2, 200}];
    Select[Range[2,200],GCD@@FactorInteger[#][[All,-1]]===1&] (* Michael De Vlieger, Oct 21 2016. Corrected by Gus Wiseman, Jan 14 2017 *)
  • PARI
    is(n)=!ispower(n)&&n>1 \\ Charles R Greathouse IV, Jul 01 2013
    
  • Python
    from sympy import mobius, integer_nthroot
    def A007916(n):
        def f(x): return int(n+1-sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Aug 13 2024

Formula

A075802(a(n)) = 0. - Reinhard Zumkeller, Mar 19 2009
Gcd(exponents in prime factorization of a(n)) = 1, cf. A124010. - Reinhard Zumkeller, Apr 13 2012
a(n) ~ n. - Charles R Greathouse IV, Jul 01 2013
A052409(a(n)) = 1. - Ridouane Oudra, Nov 23 2024

Extensions

More terms from Henry Bottomley, Sep 12 2000
Edited by Charles R Greathouse IV, Mar 18 2010
Further edited by N. J. A. Sloane, Nov 09 2016

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

A052409 a(n) = largest integer power m for which a representation of the form n = k^m exists (for some k).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Greatest common divisor of all prime-exponents in canonical factorization of n for n>1: a(n)>1 iff n is a perfect power; a(A001597(k))=A025479(k). - Reinhard Zumkeller, Oct 13 2002
a(1) set to 0 since there is no largest finite integer power m for which a representation of the form 1 = 1^m exists (infinite largest m). - Daniel Forgues, Mar 06 2009
A052410(n)^a(n) = n. - Reinhard Zumkeller, Apr 06 2014
Positions of 1's are A007916. Smallest base is given by A052410. - Gus Wiseman, Jun 09 2020

Examples

			n = 72 = 2*2*2*3*3: GCD[exponents] = GCD[3,2] = 1. This is the least n for which a(n) <> A051904(n), the minimum of exponents.
For n = 10800 = 2^4 * 3^3 * 5^2, GCD[4,3,2] = 1, thus a(10800) = 1.
		

Crossrefs

Apart from the initial term essentially the same as A253641.
Differs from A051904 for the first time at n=72, where a(72) = 1, while A051904(72) = 2.
Differs from A158378 for the first time at n=10800, where a(10800) = 1, while A158378(10800) = 2.

Programs

Formula

a(1) = 0; for n > 1, a(n) = gcd(A067029(n), a(A028234(n))). - Antti Karttunen, Aug 07 2017

Extensions

More terms from Labos Elemer, Jun 17 2002

A089723 a(1)=1; for n>1, a(n) gives number of ways to write n as n = x^y, 2 <= x, 1 <= y.

Original entry on oeis.org

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

Views

Author

Naohiro Nomoto, Jan 07 2004

Keywords

Comments

This function depends only on the prime signature of n. - Franklin T. Adams-Watters, Mar 10 2006
a(n) is the number of perfect divisors of n. Perfect divisor of n is divisor d such that d^k = n for some k >= 1. a(n) > 1 for perfect powers n = A001597(m) for m > 2. - Jaroslav Krizek, Jan 23 2010
Also the number of uniform perfect integer partitions of n - 1. An integer partition of n is uniform if all parts appear with the same multiplicity, and perfect if every nonnegative integer up to n is the sum of a unique submultiset. The Heinz numbers of these partitions are given by A326037. The a(16) = 3 partitions are: (8,4,2,1), (4,4,4,1,1,1), (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1). - Gus Wiseman, Jun 07 2019
The record values occur at 1 and at 2^A002182(n) for n > 1. - Amiram Eldar, Nov 06 2020

Examples

			144 = 2^4 * 3^2, gcd(4,2) = 2, d(2) = 2, so a(144) = 2. The representations are 144^1 and 12^2.
From _Friedjof Tellkamp_, Jun 14 2025: (Start)
n:          1, 2, 3, 4, 5, 6, 7, 8, 9, ...
----------------------------------------------------
1st powers: 1, 1, 1, 1, 1, 1, 1, 1, 1, ... (A000012)
Squares:    1, 0, 0, 1, 0, 0, 0, 0, 1, ... (A010052)
Cubes:      1, 0, 0, 0, 0, 0, 0, 1, 0, ... (A010057)
Quartics:   1, 0, 0, 0, 0, 0, 0, 0, 0, ... (A374016)
...
Sum:       oo, 1, 1, 2, 1, 1, 1, 2, 2, ...
a(1)=1:     1, 1, 1, 2, 1, 1, 1, 2, 2, ... (= this sequence). (End)
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    A089723 := proc(n) local t1,t2,g,j;
    if n=1 then 1 else
    t1:=ifactors(n)[2]; t2:=nops(t1); g := t1[1][2];
    for j from 2 to t2 do g:=gcd(g,t1[j][2]); od:
    tau(g); fi; end;
    [seq(A089723(n),n=1..100)]; # N. J. A. Sloane, Nov 10 2016
  • Mathematica
    Table[DivisorSigma[0, GCD @@ FactorInteger[n][[All, 2]]], {n, 100}] (* Gus Wiseman, Jun 12 2017 *)
  • PARI
    a(n) = if (n==1, 1, numdiv(gcd(factor(n)[,2]))); \\ Michel Marcus, Jun 13 2017
    
  • Python
    from math import gcd
    from sympy import factorint, divisor_sigma
    def a(n):
        if n == 1: return 1
        e = list(factorint(n).values())
        g = e[0]
        for ei in e[1:]: g = gcd(g, ei)
        return divisor_sigma(g, 0)
    print([a(n) for n in range(1, 105)]) # Michael S. Branicky, Jul 15 2021

Formula

If n = Product p_i^e_i, a(n) = d(gcd()). - Franklin T. Adams-Watters, Mar 10 2006
Sum_{n=1..m} a(n) = A255165(m) + 1. - Richard R. Forberg, Feb 16 2015
Sum_{n>=2} a(n)/n^s = Sum_{n>=2} 1/(n^s-1) = Sum_{k>=1} (zeta(s*k)-1) for all real s with Re(s) > 1 (Golomb, 1973). - Amiram Eldar, Nov 06 2020
For n > 1, a(n) = Sum_{i=1..floor(n/2)} floor(n^(1/i))-floor((n-1)^(1/i)). - Wesley Ivan Hurt, Dec 08 2020
Sum_{n>=1} (a(n)-1)/n = 1 (Mycielski, 1951). - Amiram Eldar, Jul 15 2021
From Friedjof Tellkamp, Jun 14 2025: (Start)
a(n) = 1 + A259362(n) = 1 + A010052(n) + A010057(n) + A374016(n) + (...), for n > 1.
G.f.: x + Sum_{j>=2, k>=1} x^(j^k). (End)

A279944 Number of positions in the free pure symmetric multifunction in one symbol with j-number n.

Original entry on oeis.org

1, 3, 5, 5, 7, 7, 9, 4, 7, 9, 11, 6, 9, 11, 13, 7, 8, 11, 13, 15, 9, 10, 13, 15, 9, 17, 6, 11, 12, 15, 17, 6, 11, 19, 8, 9, 13, 14, 17, 19, 8, 13, 21, 10, 11, 15, 16, 19, 11, 21, 10, 15, 23, 12, 13, 17, 18, 21, 13, 23, 12, 17, 25, 7, 14, 15, 19, 20, 23, 15, 25, 14, 19, 27, 9, 16, 17, 21, 22, 25, 9, 17, 27, 16, 21, 29, 11, 18, 19, 23, 24, 27, 11, 19, 29, 18, 23, 31, 13, 11
Offset: 1

Views

Author

Gus Wiseman, Dec 24 2016

Keywords

Comments

A free pure symmetric multifunction in one symbol f in PSM(x) is either (case 1) f = the symbol x, or (case 2) f = an expression of the form h[g_1,...,g_k] where h is in PSM(x), each of the g_i for i=1..(k>0) is in PSM(x), and for i < j we have g_i <= g_j under a canonical total ordering of PSM(x), such as the Mathematica ordering of expressions. For a positive integer n we define a free pure symmetric multifunction j(n) by: j(1)=x; j(n>1) = j(h)[j(g_1),...,j(g_k)] where n = r(h)^(p(g_1)*...*p(g_k)-1). Here r(n) is the n-th number that is not a perfect power (A007916) and p(n) is the n-th prime number (A000040). See example. Then a(n) is the number of brackets [...] plus the number of x's in j(n).

Examples

			The first 20 free pure symmetric multifunctions in x are:
j(1)  = j(1)            = x
j(2)  = j(1)[j(1)]      = x[x]
j(3)  = j(2)[j(1)]      = x[x][x]
j(4)  = j(1)[j(2)]      = x[x[x]]
j(5)  = j(3)[j(1)]      = x[x][x][x]
j(6)  = j(4)[j(1)]      = x[x[x]][x]
j(7)  = j(5)[j(1)]      = x[x][x][x][x]
j(8)  = j(1)[j(1),j(1)] = x[x,x]
j(9)  = j(2)[j(2)]      = x[x][x[x]]
j(10) = j(6)[j(1)]      = x[x[x]][x][x]
j(11) = j(7)[j(1)]      = x[x][x][x][x][x]
j(12) = j(8)[j(1)]      = x[x,x][x]
j(13) = j(9)[j(1)]      = x[x][x[x]][x]
j(14) = j(10)[j(1)]     = x[x[x]][x][x][x]
j(15) = j(11)[j(1)]     = x[x][x][x][x][x][x]
j(16) = j(1)[j(3)]      = x[x[x][x]]
j(17) = j(12)[j(1)]     = x[x,x][x][x]
j(18) = j(13)[j(1)]     = x[x][x[x]][x][x]
j(19) = j(14)[j(1)]     = x[x[x]][x][x][x][x]
j(20) = j(15)[j(1)]     = x[x][x][x][x][x][x][x].
		

Crossrefs

Cf. A279984 (numbers j(n)[x]=j(prime(n))), A277576 (numbers j(n)=x[x][x][x]...), A058891 (numbers j(n)=x[x,...,x]), A279969 (numbers j(n)=x[x[...[x]]]).

Programs

  • Mathematica
    nn=100;
    radQ[n_]:=If[n===1,False,SameQ[GCD@@FactorInteger[n][[All,2]],1]];
    rad[n_]:=rad[n]=If[n===0,1,NestWhile[#+1&,rad[n-1]+1,Not[radQ[#]]&]];
    Set@@@Array[radPi[rad[#]]==#&,nn];
    jfac[n_]:=With[{g=GCD@@FactorInteger[n+1][[All,2]]},JIX[radPi[Power[n+1,1/g]],Flatten[Cases[FactorInteger[g+1],{p_,k_}:>ConstantArray[PrimePi[p],k]]]]];
    diwt[n_]:=If[n===1,1,Apply[1+diwt[#1]+Total[diwt/@#2]&,jfac[n-1]]];
    Array[diwt,nn]

Formula

a(A007916(h)^(A000040(g_1)*...*A000040(g_k)-1)) = 1 + a(h) + a(g_1) + ... + a(g_k).

A277564 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. The sequence is an irregular triangle read by rows, where the n-th row lists n followed by x_1, ..., x_k.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 20 2016

Keywords

Comments

The row lengths are A288636(n) + 1. - Gus Wiseman, Jun 12 2017
See A278028 for a version in which row n simply lists x_1, x_2, ..., x_k (omitting the initial n).

Examples

			1 is represented by the empty sequence (), by convention.
Successive rows of the triangle are as follows (c(k) denotes the k-th non-prime-power, A007916(k)):
2, 1,
3, 2,
4, 1, 1,
5, 3,
6, 4, because 6 = c(4)
7, 5,
8, 1, 2, because 8 = 2^3 = c(1)^c(2)
9, 2, 1,
10, 6,
11, 7,
...
16, 1, 1, 1, because 16 = 2^4 = c(1)^4 = c(1)^(c(1)^2) = c[1]^(c[1]^c[1])
17, 12,
...
This sequence represents a bijection N -> Q where Q is the set of all finite sequences of positive integers: 1->(), 2->(1), 3->(2), 4->(1 1), 5->(3), 6->(4), 7->(5), 8->(1 2), 9->(2 1), ...
		

Crossrefs

Programs

  • Maple
    See link.
  • Mathematica
    nn=10000;radicalQ[1]:=False;radicalQ[n_]:=SameQ[GCD@@FactorInteger[n][[All,2]],1];
    hyperfactor[1]:={};hyperfactor[n_?radicalQ]:={n};hyperfactor[n_]:=With[{g=GCD@@FactorInteger[n][[All,2]]},Prepend[hyperfactor[g],Product[Apply[Power[#1,#2/g]&,r],{r,FactorInteger[n]}]]];
    rad[0]:=1;rad[n_?Positive]:=rad[n]=NestWhile[#+1&,rad[n-1]+1,Not[radicalQ[#]]&];Set@@@Array[radPi[rad[#]]==#&,nn];
    Flatten[Join[{#},radPi/@hyperfactor[#]]&/@Range[nn]]

Extensions

Edited by N. J. A. Sloane, Nov 09 2016

A289023 Position in the sequence of numbers that are not perfect powers (A007916) of the smallest positive integer x such that for some positive integer y we have n = x^y (A052410).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 22 2017

Keywords

Comments

Every pair p of positive integers is of the form p = (a(n), A052409(n)) for exactly one n.

Examples

			a(27)=2 because the smallest root of 27 is 3, and 3 is the 2nd entry of A007916.
a(25)=3 because the smallest root of 25 is 5, and 5 is the 3rd entry of A007916.
		

Crossrefs

Programs

  • Mathematica
    nn=100;
    q=Table[Power[n,1/GCD@@FactorInteger[n][[All,2]]],{n,2,nn}];
    q/.Table[Union[q][[i]]->i,{i,Length[Union[q]]}]
  • PARI
    a(n) = if (ispower(n,,&r), x = r, x = n); sum(k=2, x, ispower(k)==0); \\ Michel Marcus, Jul 19 2017

Formula

For n>1 we have a(n) = A278028(n,1).

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}]
Showing 1-10 of 14 results. Next