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.

A133500 The powertrain or power train map: Powertrain(n): if abcd... is the decimal expansion of a number n, then the powertrain of n is the number n' = a^b*c^d* ..., which ends in an exponent or a base according as the number of digits is even or odd. a(0) = 0 by convention.

Original entry on oeis.org

0, 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: 0

Views

Author

J. H. Conway, Dec 03 2007

Keywords

Comments

We take 0^0 = 1.
The fixed points are in A135385.
For 1-digit or 2-digit numbers this is the same as A075877. - R. J. Mathar, Mar 28 2012
a(A221221(n)) = A133048(A221221(n)) = A222493(n). - Reinhard Zumkeller, May 27 2013

Examples

			20 -> 2^0 = 1,
21 -> 2^1 = 2,
24 -> 2^4 = 16,
39 -> 3^9 = 19683,
623 -> 6^2*3 = 108,
etc.
		

Crossrefs

Cf. A075877, A133501 (number of steps to reach fixed point), A133502, A135385 (the conjectured list of fixed points), A135384 (numbers which converge to 2592). For records see A133504, A133505; for the fixed points that are reached when this map is iterated starting at n, see A287877.
Cf. also A133048 (powerback), A031346 and A003001 (persistence).
Cf. also A031298, A007376.

Programs

  • Haskell
    a133500 = train . reverse . a031298_row where
       train []       = 1
       train [x]      = x
       train (u:v:ws) = u ^ v * (train ws)
    -- Reinhard Zumkeller, May 27 2013
    
  • Maple
    powertrain:=proc(n) local a,i,n1,n2,t1,t2; n1:=abs(n); n2:=sign(n); t1:=convert(n1, base, 10); t2:=nops(t1); a:=1; for i from 0 to floor(t2/2)-1 do a := a*t1[t2-2*i]^t1[t2-2*i-1]; od: if t2 mod 2 = 1 then a:=a*t1[1]; fi; RETURN(n2*a); end; # N. J. A. Sloane, Dec 03 2007
  • Mathematica
    ptm[n_]:=Module[{idn=IntegerDigits[n]},If[EvenQ[Length[idn]],Times@@( #[[1]]^ #[[2]] &/@Partition[idn,2]),(Times@@(#[[1]]^#[[2]] &/@ Partition[ Most[idn],2]))Last[idn]]]; Array[ptm,70,0] (* Harvey P. Dale, Jul 15 2019 *)
  • Python
    def A133500(n):
        s = str(n)
        l = len(s)
        m = int(s[-1]) if l % 2 else 1
        for i in range(0,l-1,2):
            m *= int(s[i])**int(s[i+1])
        return m # Chai Wah Wu, Jun 16 2017

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