OFFSET
0,3
EXAMPLE
For n = 33: a(33) = 1 because for the number 33 there are 4 steps of defined iteration: {3^3 = 27}, {7^2 = 49}, {9^4 = 6561}, {((1^6)^5)^6 = 1} and the 4th step of iteration ends with 1. - Jaroslav Krizek, May 09 2010
MAPLE
A175420 := proc(n) option remember; local dgs, a, i ; if n = 0 then return 0 ; end if; dgs := convert(n, base, 10) ; if op(1, dgs)= 0 then return 0 ; end if; for i from 1 to nops(dgs) do if op(-i, dgs) = 0 then dgs := [op(-i..nops(dgs), dgs)] ; dgs := subsop(1=1, dgs) ; break ; end if; end do: a := op(1, dgs) ; for i from 2 to nops(dgs) do a := a^ dgs[i] ; end do: a ; end proc:
seq(A175423(n), n=0..100) ; # R. J. Mathar, May 12 2010
MATHEMATICA
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, May 09 2010
EXTENSIONS
More terms from R. J. Mathar, May 12 2010
a(100) corrected by Stefano Spezia, Feb 25 2024
STATUS
approved