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 A054085 #17 Nov 28 2024 13:27:45 %S A054085 2,2,7,7,7,7,7,7,9,7,9,9,9,9,9,9,-1,9,-1,9,-1,-1,-1,-1,16,-1,16,-1,16, %T A054085 -1,-1,16,16,16,16,16,-1,-1,16,16,-1,16,-1,16,-1,-1,16,-1,-1,16,-1,16, %U A054085 -1,-1,-1,-1,-1,-1,-1,-1,-1,16,-1,-1,-1,-1,-1,-1,-1 %N A054085 a(n) = order of n in the permutation A054084 of the natural numbers if this order exists; a(n) = -1 otherwise. %e A054085 3 -> 5 -> 7 -> 10 -> 8 -> 6 -> 4 -> 3, so that 3 has order 7. %t A054085 a054084[n_] := a054084[n] = If[EvenQ[n], Floor[n/2*GoldenRatio], %t A054085 Floor[(n + 1)/2*GoldenRatio^2]]; %t A054085 Array[a054084[#] &, 40] (* after _Jean-François Alcover_ *) %t A054085 Table[Length[NestWhileList[a054084, a054084[n], # != n &, 1, %t A054085 10000]] /. (10001 -> -1), {n, 1, 500}] %t A054085 (* _Peter J. C. Moses_, Jan 26 2022 *) %Y A054085 Cf. A054083, A054084. %K A054085 sign %O A054085 1,1 %A A054085 _Clark Kimberling_ %E A054085 Data truncated by _Sean A. Irvine_, Jan 23 2022 %E A054085 Edited by _Clark Kimberling_, Jan 26 2022