OFFSET
1,3
COMMENTS
a^^b is the right associative power tower a^a^...^a^a of height b. a^^-1= 0 and a^^0 = 1. We exclude b=1 because otherwise all natural numbers would be in the sequence.
EXAMPLE
Numbers written as power towers include:
5^^2 = 5^5 = 3125;
3^^3 = 3^3^3 = 3^27 = 7625597484987;
2^^4 = 2^2^2^2 = 2^2^4 = 2^16 = 65536;
0^^5 = 0^0^0^0^0 = 0^0^0^1 = 0^0^0 = 0^1 = 0;
MAPLE
Digits := 200 ;
tpow := proc(a, b, logamax)
option remember;
if b = 0 then
1;
elif b = 1 then
a;
elif b = 2 then
a^a;
else
# log a^procname(a, b-1) = procnmae(a, b-1)*loga
if evalf(procname(a, b-1, logamax)*log(a)) > evalf(logamax) then
return -1 ;
elif procname(a, b-1, logamax) < 0 then
return -1 ;
else
a^procname(a, b-1, logamax) ;
end if;
end if;
end proc:
A257309 := proc(amax)
local a, n, m, t, logamax;
a := {0, 1} ;
logamax := evalf(log(amax)) ;
for n from 2 to amax do
if n^n > amax then
break;
end if;
for m from 2 do
t := tpow(n, m, logamax) ;
if t > amax or t < 0 then
break;
elif t <= amax and t > 0 then
a := a union {t} ;
end if;
end do:
end do:
sort(convert(a, list)) ;
end proc:
A257309(10^30) ; # R. J. Mathar, Jun 24 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Natan Arie Consigli, May 07 2015
STATUS
approved