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

A256231 Inverse of permutation in A185969.

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, Mar 19 2015

Keywords

Comments

Permutation of the natural numbers A000027 with inverse permutation A185969.

Crossrefs

Cf. A185969.

A299229 {2,3}-power towers in increasing order, concatenated; see Comments.

Original entry on oeis.org

2, 3, 2, 2, 2, 3, 3, 2, 2, 2, 2, 3, 3, 3, 2, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 2, 3, 2, 2, 3, 3, 2, 2, 2, 2, 2, 3, 3, 2, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 3, 3, 2, 3, 2, 3, 3, 2, 3, 3, 3, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Clark Kimberling, Feb 06 2018

Keywords

Comments

Suppose that S is a set of real numbers. An S-power-tower, t, is a number t = x(1)^x(2)^...^x(k), where k >= 1 and x(i) is in S for i = 1..k. We represent t by (x(1), x(2), ..., x(k)), which for k > 1 is defined as (x(1), (x(2), ..., x(k))); (2,3,2) means 2^9. The number k is the *height* of t. If every element of S exceeds 1 and all the power towers are ranked in increasing order, the position of each in the resulting sequence is its *rank*.
In the following guide, "tower" means "power-tower", and t(n) denotes the n-th {2,3}-tower, represented as (x(1), x(2), ..., x(k)).
A299229: sequence of all {2,3}-towers, ranked, concatenated
A299230: a(n) = height of t(n)
A299231: all n such that t(n) has x(1) = 2
A299232: all n such that t(n) has x(1) = 3
A299233: all n such that t(n) has x(k) = 2
A299234: all n such that t(n) has x(k) = 3
A299235: a(n) = number of 2's in t(n)
A299236: a(n) = number of 3's in t(n)
A299237: a(n) = m satisfying t(m) = reversal of t(n)
A299238; a(n) = m satisfying t(m) = 5 - t(n)
A299239: all n such that t(n) is a palindrome
A299240: ranks of all t[n] in which #2's > #3's
A299241: ranks of all t[n] in which #2's = #3's
A299242: ranks of all t[n] in which #2's < #3's
A299322: ranks of t[n] in which the 2's and 3's alternate
Rectangular arrays:
A299323: row n shows ranks of towers in which #2's = n
A299324: row n shows ranks of towers in which #3's = n
A299325: row n shows ranks of towers that start with n 2's
A299326: row n shows ranks of towers that start with n 3's
A299327: row n shows ranks of towers having maximal runlength n

Examples

			As an irregular triangle, where row n contains the digits of A248907(n):
  2;
  3;
  2, 2;
  2, 3;
  3, 2;
  2, 2, 2;
  3, 3;
  3, 2, 2;
  2, 2, 3;
  2, 3, 2;
  3, 2, 3;
  3, 3, 2;
  2, 2, 2, 2;
  3, 2, 2, 2;
  2, 3, 3;
  ...
		

Crossrefs

Programs

  • Mathematica
    t[1] = {2}; t[2] = {3}; t[3] = {2, 2}; t[4] = {2, 3}; t[5] = {3, 2};
    t[6] = {2, 2, 2}; t[7] = {3, 3}; t[8] = {3, 2, 2}; t[9] = {2, 2, 3};
    t[10] = {2, 3, 2}; t[11] = {3, 2, 3}; t[12] = {3, 3, 2};
    z = 190; g[k_] := If[EvenQ[k], {2}, {3}]; f = 6;
    While[f < 13, n = f; While[n < z, p = 1;
      While[p < 12, m = 2 n + 1; v = t[n]; k = 0;
        While[k < 2^p, t[m + k] = Join[g[k], t[n + Floor[k/2]]]; k = k + 1];
       p = p + 1; n = m]]; f = f + 1]
    Flatten[Table[t[n], {n, 1, 120}]];  (* A299229 *)

A248907 Numbers consisting only of digits 2 and 3, ordered according to the value obtained when the digits are interspersed with (right-associative) ^ operators.

Original entry on oeis.org

2, 3, 22, 23, 32, 222, 33, 322, 223, 232, 323, 332, 2222, 3222, 233, 333, 2322, 3322, 2223, 3223, 2232, 3232, 2323, 3323, 2332, 3332, 22222, 32222, 23222, 33222, 2233, 3233, 2333, 3333, 22322, 32322, 23322, 33322, 22223, 32223, 23223, 33223, 22232, 32232
Offset: 1

Views

Author

Keywords

Comments

A256179(n) is found by treating the digits of a(n) as power towers. So for example, a(11) = 323, so A256179(11) = 6561 because 3^(2^3) = 6561. - Bob Selcoe, Mar 18 2015
This is a permutation of the list A032810 (numbers having only digits 2 and 3) in the sense that is a list with exactly the same terms but in different order, namely such that the ("power tower") function A256229 yields an increasing sequence. The permutation of the indices is given by A185969, cf. formula. - M. F. Hasler, Mar 21 2015

Crossrefs

For another version, see A299229 (each digit is a separate term).

Programs

  • Haskell
    a248907 = a032810 . a185969
    
  • Mathematica
    ClearAll[a, p];
    p[d_, n_] := d 10^IntegerLength[n] + n;
    a[n_ /; n <= 12] := a[n] = {2, 3, 22, 23, 32, 222, 33, 322, 223, 232, 323, 332}[[n]];
    a[n_ /; OddQ[n]]  := a[n] = p[2, a[(n - 1)/2]];
    a[n_] := a[n] = p[3, a[(n - 2)/2]];
    Array[a, 100]
  • PARI
    vecsort(A032810,(a,b)->A256229(a)>A256229(b)) \\ Assuming that A032810 is defined as a vector. Append [1..N] if the vector A032810 has too many (thus too large) elements: recall that 33333 => 3^(3^(3^(3^3))). - M. F. Hasler, Mar 21 2015

Formula

a(n) = A032810(A185969(n)).

Extensions

Edited by M. F. Hasler, Mar 21 2015

A256179 Sequence of power towers in ascending order, using all possible permutations of 2's and 3's.

Original entry on oeis.org

2, 3, 4, 8, 9, 16, 27, 81, 256, 512, 6561, 19683, 65536, 43046721, 134217728, 7625597484987, 2417851639229258349412352, 443426488243037769948249630619149892803, 115792089237316195423570985008687907853269984665640564039457584007913129639936
Offset: 1

Views

Author

Bob Selcoe, Mar 18 2015

Keywords

Comments

a(n) is found by treating the digits of A248907(n) as power towers, so the sequence starts 2, 3, 2^2=4, 2^3=8, 3^2=9, 2^(2^2)=16, 3^3=27, 3^(2^2)=81, 2^(2^3)=256...

Examples

			a(12) = 19683 because A248907(12) = 332, and 3^(3^2) = 19683.
a(23) = 2^3^2^3 = 11423...73952 (1976 digits), because A248907(23) = 2323.
		

Crossrefs

Programs

Formula

Recurrence: a(1)=2, a(2)=3, a(3)=2^2, a(4)=2^3, a(5)=3^2, a(6)=2^(2^2), a(7)=3^3, a(8)=3^(2^2), a(9)=2^(2^3), a(10)=2^(3^2), a(11)=3^(2^3), a(12)=3^(3^2); and for n>6, a(2n)=3^a(n-1), a(2n-1)=2^a(n-1). - Vladimir Reshetnikov, Mar 19 2015

Extensions

More terms from M. F. Hasler, Mar 19 2015

A256229 Powering the decimal digits of n (right-associative) with 0^0 = 1 by convention.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1, 3, 9, 27, 81, 243, 729, 2187, 6561, 19683, 1, 4, 16, 64, 256, 1024, 4096, 16384, 65536, 262144, 1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 1, 6, 36, 216, 1296
Offset: 1

Views

Author

M. F. Hasler, Mar 19 2015

Keywords

Comments

See A075877 for the left-associative version (which grows much more slowly). Usually the "^" operator is considered right-associative (so this is the "natural" version), i.e., a^b^c = a^(b^c) since (a^b)^c could be written a^(b*c) instead, while there is no such simplification for a^(b^c).
If n's first digit is succeeded by an odd number of consecutive 0's, a(n) is 1. If it is by an even number, a(n) is the first digit of n (A000030). - Alex Costea, Mar 27 2019

Examples

			a(253) = 2^5^3 = 2^(5^3) = 2^125 = 42535295865117307932921825928971026432.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local m, r; m, r:= n, 1;
          while m>0 do r:= irem(m, 10, 'm')^r od; r
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Mar 19 2015
  • Mathematica
    Power @@ IntegerDigits@ # & /@ Range@ 64 /. Indeterminate -> 1 (* Michael De Vlieger, Mar 21 2015 *)
  • PARI
    A256229(n,p=1)={until(!n\=10,p=(n%10)^p);p}
    
  • Python
    def A256229(n):
        y = 1
        for d in reversed(str(n)):
            y = int(d)**y
        return y # Chai Wah Wu, Mar 21 2015

Formula

a(n) = A075877(n) for n < 212.
a(n) = A133500(n) for n < 100.
a(10n+1) = a(n).

Extensions

Incorrect comments deleted by Alex Costea, Mar 24 2019

A075877 Powering the decimal digits of n (left-associative).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1, 3, 9, 27, 81, 243, 729, 2187, 6561, 19683, 1, 4, 16, 64, 256, 1024, 4096, 16384, 65536, 262144, 1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 1, 6, 36, 216, 1296
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 16 2002

Keywords

Comments

See A256229 for the (maybe more natural) "right-associative" variant, a(xyz)=x^(y^z). a(n) = A256229(n) for n < 212 (up to 210, according to the 2nd formula which also holds for A256229), but (2^1)^2 = 4 while 2^(1^2) = 1. - M. F. Hasler, Mar 22 2015

Examples

			a(253) = (2^5)^3 = 32^3 = 32768.
		

Crossrefs

Programs

Formula

a(n) = if n < 10 then n else a(floor(n\10))^(n mod 10).
a(n) = 1 iff the initial digit is 1 or n contains a 0 (i.e., A055641(n) > 0 or A000030(n) = 1);
a(A011540(n)) = 1.
a(n) = A133500(n) for n <= 99. - Reinhard Zumkeller, May 27 2013

Extensions

Formula corrected by Reinhard Zumkeller, May 27 2013
Edited by M. F. Hasler, Mar 22 2015

A375374 Let X be the sequence of power towers built of 2's and 3's, sorted first by their height and then colexicographically: 2, 3, 2^2, 3^2, 2^3, 3^3, 2^2^2, 3^2^2, etc. Sequence gives the permutation of indices which reorders X by magnitude.

Original entry on oeis.org

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

Views

Author

Pontus von Brömssen, Aug 13 2024

Keywords

Comments

The terms are less dispersed here compared to A185969, because colex order is more correlated to the magnitude of the power tower than lex order is, i.e., we often get a smaller value of the power tower by putting the small numbers high up in the tower. Specifically, the only integers x, y >= 2 for which x < y and x^y < y^x is x = 2, y = 3.

Crossrefs

3rd row of A375376.
Cf. A081241, A185969 (lexicographic instead of colexicographic order), A375375 (inverse permutation).

Formula

a(2*n-1) = 2*a(n-1)+1 and a(2*n) = a(2*n-1)+1 for n >= 7.
a(n) = A081241(A185969(n)).

A375376 Square array read by antidiagonals: Let n = Sum_{i=1..m} 2^e_i be the binary expansion of n, let S be the set {e_i+2; 1 <= i <= m}, and let X be the sequence of power towers built of numbers in S, sorted first by their height and then colexicographically. The n-th row of the array gives the permutation of indices which reorders X by magnitude. In case of ties, keep the colexicographic order.

Original entry on oeis.org

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

Views

Author

Pontus von Brömssen, Aug 14 2024

Keywords

Comments

Each row is a permutation of the positive integers.
If n is a power of 2, the set S contains a single number and the n-th row is the identity permutation.

Examples

			Array begins:
   n=1: 1, 2, 3, 4, 5, 6,  7,  8,  9, 10, 11, 12, 13, 14, 15, ...
   n=2: 1, 2, 3, 4, 5, 6,  7,  8,  9, 10, 11, 12, 13, 14, 15, ...
   n=3: 1, 2, 3, 5, 4, 7,  6,  8, 11,  9, 12, 10, 15, 16, 13, ...
   n=4: 1, 2, 3, 4, 5, 6,  7,  8,  9, 10, 11, 12, 13, 14, 15, ...
   n=5: 1, 2, 3, 4, 5, 7,  6,  8,  9, 11, 15, 10, 12, 16, 13, ...
   n=6: 1, 2, 3, 4, 5, 6,  7,  8,  9, 10, 11, 12, 13, 14, 15, ...
   n=7: 1, 2, 3, 4, 7, 5,  6, 10, 13,  8,  9, 11, 14, 12, 15, ...
   n=8: 1, 2, 3, 4, 5, 6,  7,  8,  9, 10, 11, 12, 13, 14, 15, ...
   n=9: 1, 3, 2, 7, 4, 5,  8,  6, 15,  9, 11, 16, 10, 12, 17, ...
  n=10: 1, 2, 3, 4, 5, 6,  7,  8,  9, 10, 11, 12, 13, 14, 15, ...
  n=11: 1, 2, 4, 3, 7, 5, 13,  6,  8, 10, 14,  9, 11, 22, 16, ...
  n=12: 1, 2, 3, 4, 5, 6,  7,  8,  9, 10, 11, 12, 13, 14, 15, ...
  n=13: 1, 2, 4, 3, 5, 7, 13,  6, 10,  8, 14,  9, 15, 11, 12, ...
  n=14: 1, 2, 3, 4, 5, 7,  6, 10,  8,  9, 11, 12, 13, 14, 15, ...
  n=15: 1, 2, 3, 5, 4, 9,  6,  7, 13, 21,  8, 10, 17, 11, 14, ...
For n = 7 = 2^0 + 2^1 + 2^2, the set S is {0+2, 1+2, 2+2} = {2, 3, 4}. The smallest power towers formed by 2's, 3's, and 4's, together with their colex ranks are:
   k | power tower | colex rank T(7,k)
   --+-------------+------------------
   1 |     2 = 2   |        1
   2 |     3 = 3   |        2
   3 |     4 = 4   |        3
   4 |   2^2 = 4   |        4
   5 |   2^3 = 8   |        7
   6 |   3^2 = 9   |        5
   7 |   4^2 = 16  |        6
   8 |   2^4 = 16  |       10
   9 | 2^2^2 = 16  |       13
  10 |   3^3 = 27  |        8
  11 |   4^3 = 64  |        9
  12 |   3^4 = 81  |       11
  13 | 3^2^2 = 81  |       14
  14 |   4^4 = 256 |       12
  15 | 4^2^2 = 256 |       15
		

Crossrefs

Cf. A185969, A299229, A375374 (3rd row), A375377 (the inverse permutation to each row).
Showing 1-8 of 8 results.