OFFSET
0,3
COMMENTS
A variant of A217727. Appears to be a permutation of the integers.
PROG
(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))}
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Nov 20 2016
STATUS
approved