%I #8 Nov 25 2016 11:59:47
%S 0,1,2,4,16,3,9,81,5,25,625,7,49,2401,8,64,4096,16777216,17,289,6,36,
%T 1296,1679616,15,225,50625,11,121,14641,10,100,10000,100000000,19,361,
%U 130321,12,144,20736,429981696,20,400,160000,25600000000,24,576,331776,13,169,28561,815730721,21,441,194481,37822859361,1430568690241985328321
%N a(n+1) = floor(log(a(n))+1) if this number does not occur earlier, a(n+1) = a(n)^2 else; a(n) = n for n <= 2.
%C A variant of A217727. Appears to be a permutation of the integers.
%o (PARI) {print1("0,1,"a=2);u=[];for(i=2,99,u=setunion(u,[a]); while(#u>1&&u[2]==u[1]+1,u=u[^1]);my(t=log(a)\1+1);print1(","a=if(t>u[1]&&!setsearch(u,t),t,a^2))}
%Y Cf. A217727.
%K nonn
%O 0,3
%A _M. F. Hasler_, Nov 20 2016
|