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

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}]

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)).
Showing 1-3 of 3 results.