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 A054083 #15 Nov 28 2024 13:28:01 %S A054083 2,2,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, %T A054083 -1,16,-1,-1,16,16,16,16,16,-1,-1,16,16,-1,16,-1,16,-1,-1,16,-1,-1,16, %U A054083 -1,16,-1,-1,-1,-1,-1,-1,-1,-1,-1,16,-1,-1,-1,-1,-1,-1 %N A054083 a(n) = order of n in the permutation A054082 of the natural numbers if this order exists; a(n) = -1 otherwise. %C A054083 From _Peter J. C. Moses_, Jan 26 2022: (Start) %C A054083 For n up to 60000, %C A054083 a(n) = 2 for n = 1, 2, 3, 4; %C A054083 a(n) = 7 for n = 5, 6, 7, 8, 9, 10, 12 %C A054083 a(n) = 9 for n = 11, 13, 14, 15, 16, 17, 18, 20, 22 %C A054083 a(n) = 16 for n = 27, 29, 31, 34, 35, 36, 37, 38, 41, 42, 44, 46, 49, 52, 54, 64 %C A054083 a(n) = 25 for n = 267, 283, 330, 343, 350, 371, 385, 393, 408, 424, 449, 467, 476, 486, 495, 504, 515, 524, 545, 578, 588, 612, 648, 674, 714. (End) %e A054083 5 -> 7 -> 9 -> 12 -> 10 -> 8-> 6-> 5, so that 5 has order 7. %t A054083 a054082[n_] := a054082[n] = If[OddQ[n], Floor[((n + 1)/2 - 1) GoldenRatio] + (n + 1)/2 + 1, %t A054083 Floor[(n/2 - 1) GoldenRatio] + 2]; a054082[2] = 1; %t A054083 Array[a054082[#] &, 40] (* after Jean-François Alcover *) %t A054083 Table[Length[NestWhileList[a054082, a054082[n], # != n &, 1, %t A054083 10000]] /. (10001 -> -1), {n, 1, 500}] %t A054083 (* _Peter J. C. Moses_, Jan 26 2022 *) %Y A054083 Cf. A054082, A054085. %K A054083 sign %O A054083 1,1 %A A054083 _Clark Kimberling_ %E A054083 Data truncated by _Sean A. Irvine_, Jan 23 2022 %E A054083 Edited by _Clark Kimberling_, Jan 26 2022