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.
%I A054793 #16 Apr 02 2021 17:56:41 %S A054793 0,1,3,16,5,256,7,1296,9,4096,11,10000,13,20736,15,38416,81,18,83521, %T A054793 20,130321,22,194481,24,279841,26,390625,28,531441,30,707281,32, %U A054793 923521,34,1185921,36,1500625,38,1874161,40,2313441,42,2825761,44,3418801,46 %N A054793 Earliest sequence with a(a(n)) = n^4. %H A054793 T. D. Noe, <a href="/A054793/b054793.txt">Table of n, a(n) for n = 0..1000</a> %H A054793 <a href="/index/Aa#aan">Index entries for sequences of the a(a(n)) = 2n family</a> %F A054793 if n is a 4th power then a(n)=a(n^(1/4))^4, otherwise if the difference between n and the highest 4th power less than n is odd then a(n)=n+1, otherwise a(n)=(n-1)^4. %t A054793 a[n_] := a[n] = Which[r = n^(1/4); IntegerQ[r], a[r]^4, OddQ[n - Floor[r]^4], n+1, True, (n-1)^4]; a[0]=0; a[1]=1; Table[a[n], {n, 0, 45}] (* _Jean-François Alcover_, Aug 07 2012, after formula *) %o A054793 (Python) %o A054793 from sympy import integer_nthroot %o A054793 def A054793(n): %o A054793 a, b = integer_nthroot(n,4) %o A054793 return n if n <= 1 else A054793(a)**4 if b else n+1 if (n-a**4) % 2 else (n-1)**4 # _Chai Wah Wu_, Apr 02 2021 %Y A054793 Cf. A000290, A007379. %K A054793 nonn,nice %O A054793 0,3 %A A054793 _Henry Bottomley_, Apr 27 2000