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.

A257309 Perfect hyper-4 powers: a^^b, where b <> 1.

This page as a plain text file.
%I A257309 #45 Jun 24 2024 09:18:39
%S A257309 0,1,4,16,27,256,3125,46656,65536,823543,16777216,387420489,
%T A257309 10000000000,285311670611,7625597484987,8916100448256,302875106592253,
%U A257309 11112006825558016,437893890380859375,18446744073709551616,827240261886336764177,39346408075296537575424,1978419655660313589123979,104857600000000000000000000
%N A257309 Perfect hyper-4 powers: a^^b, where b <> 1.
%C A257309 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.
%e A257309 Numbers written as power towers include:
%e A257309 5^^2 = 5^5 = 3125;
%e A257309 3^^3 = 3^3^3 = 3^27 = 7625597484987;
%e A257309 2^^4 = 2^2^2^2 = 2^2^4 = 2^16 = 65536;
%e A257309 0^^5 = 0^0^0^0^0 = 0^0^0^1 = 0^0^0 = 0^1 = 0;
%p A257309 Digits := 200 ;
%p A257309 tpow := proc(a,b,logamax)
%p A257309     option remember;
%p A257309     if b = 0 then
%p A257309         1;
%p A257309     elif b = 1 then
%p A257309         a;
%p A257309     elif b = 2 then
%p A257309         a^a;
%p A257309     else
%p A257309         # log a^procname(a,b-1) = procnmae(a,b-1)*loga
%p A257309         if evalf(procname(a,b-1,logamax)*log(a)) > evalf(logamax) then
%p A257309             return -1 ;
%p A257309         elif procname(a,b-1,logamax)  < 0 then
%p A257309             return -1 ;
%p A257309         else
%p A257309             a^procname(a,b-1,logamax) ;
%p A257309         end if;
%p A257309     end if;
%p A257309 end proc:
%p A257309 A257309 := proc(amax)
%p A257309     local a,n,m,t, logamax;
%p A257309     a := {0,1} ;
%p A257309     logamax := evalf(log(amax)) ;
%p A257309     for n from 2 to amax do
%p A257309         if n^n > amax then
%p A257309             break;
%p A257309         end if;
%p A257309         for m from 2 do
%p A257309             t := tpow(n,m,logamax) ;
%p A257309             if t > amax or t < 0 then
%p A257309                 break;
%p A257309             elif t <= amax and t > 0 then
%p A257309                 a := a union   {t} ;
%p A257309             end if;
%p A257309         end do:
%p A257309     end do:
%p A257309     sort(convert(a,list)) ;
%p A257309 end proc:
%p A257309 A257309(10^30) ; # _R. J. Mathar_, Jun 24 2024
%Y A257309 Cf. A004231, A002488.
%K A257309 nonn
%O A257309 1,3
%A A257309 _Natan Arie Consigli_, May 07 2015