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 11-17 of 17 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}]

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

A317100 Number of series-reduced planted achiral trees with n leaves spanning an initial interval of positive integers.

Original entry on oeis.org

1, 3, 5, 12, 17, 41, 65, 144, 262, 533, 1025, 2110, 4097, 8261, 16407, 32928, 65537, 131384, 262145, 524854, 1048647, 2098181, 4194305, 8390924, 16777234, 33558533, 67109132, 134226070, 268435457, 536887919, 1073741825, 2147516736, 4294968327, 8590000133
Offset: 1

Views

Author

Gus Wiseman, Aug 01 2018

Keywords

Comments

In these trees, achiral means that all branches directly under any given node that is not a leaf or a cover of leaves are equal, and series-reduced means that every node that is not a leaf or a cover of leaves has at least two branches.

Examples

			The a(4) = 12 trees:
  (1111), ((11)(11)), (((1)(1))((1)(1))), ((1)(1)(1)(1)),
  (1222),
  (1122), ((12)(12)),
  (1112),
  (1233),
  (1223),
  (1123),
  (1234).
		

Crossrefs

Programs

  • Mathematica
    allnorm[n_Integer]:=Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1];
    b[n_]:=1+Sum[b[n/d],{d,Rest[Divisors[n]]}];
    a[n_]:=Sum[b[GCD@@Length/@Split[ptn]],{ptn,allnorm[n]}];
    Array[a,10]
  • PARI
    seq(n)={my(v=vector(n)); for(n=1, n, v[n]=2^(n-1) + sumdiv(n, d, v[d])); v} \\ Andrew Howroyd, Aug 19 2018

Formula

a(n) ~ 2^(n-1). - Vaclav Kotesovec, Sep 07 2019

Extensions

Terms a(21) and beyond from Andrew Howroyd, Aug 19 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)).

A316789 Number of same-tree-factorizations of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 6, 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, 14, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Jul 14 2018

Keywords

Comments

A constant factorization of n is a finite nonempty constant multiset of positive integers greater than 1 with product n. Constant factorizations correspond to perfect divisors (A089723). A same-tree-factorization of n is either (case 1) the number n itself or (case 2) a finite sequence of two or more same-tree-factorizations, one of each factor in a constant factorization of n.
a(n) depends only on the prime signature of n. - Andrew Howroyd, Nov 18 2018

Examples

			The a(64) = 14 same-tree-factorizations:
  64
  (8*8)
  (4*4*4)
  (8*(2*2*2))
  ((2*2*2)*8)
  (4*4*(2*2))
  (4*(2*2)*4)
  ((2*2)*4*4)
  (2*2*2*2*2*2)
  (4*(2*2)*(2*2))
  ((2*2)*4*(2*2))
  ((2*2)*(2*2)*4)
  ((2*2*2)*(2*2*2))
  ((2*2)*(2*2)*(2*2))
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=1+Sum[a[n^(1/d)]^d,{d,Rest[Divisors[GCD@@FactorInteger[n][[All,2]]]]}]
    Array[a,100]
  • PARI
    a(n)={my(z, e=ispower(n,,&z)); 1 + if(e, sumdiv(e, d, if(d>1, a(z^(e/d))^d)))} \\ Andrew Howroyd, Nov 18 2018

Formula

a(n) = 1 + Sum_{n = x^y, y > 1} a(x)^y.
a(2^n) = A281145(n).

A375379 Value of the power tower formed by the numbers obtained by adding 1 to the terms in the n-th composition (in standard order).

Original entry on oeis.org

1, 2, 3, 4, 4, 9, 8, 16, 5, 16, 27, 81, 16, 512, 256, 65536, 6, 25, 64, 256, 81, 19683, 6561, 43046721, 32, 65536, 134217728, 2417851639229258349412352, 65536
Offset: 0

Views

Author

Pontus von Brömssen, Aug 14 2024

Keywords

Comments

This is a version of A375378 that does not allow 1's in the power towers.
It is natural to define a(0) = 1.
The number k >= 1 appears A294336(k) times as a term in this sequence.

Examples

			For n = 31, the 31st composition is (1, 1, 1, 1, 1), so a(31) = 2^2^2^2^2 = 2^65536.
For n = 37, the 37th composition is (3,2,1), so a(37) = 4^3^2 = 4^9 = 262144.
		

Crossrefs

Cf. A053645, A065120, A066099 (compositions in standard order), A294336, A375378.

Formula

a(n) = (A065120(n)+1)^a(A053645(n)) for n >= 1.
Previous Showing 11-17 of 17 results.