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 A266417 #8 Jan 09 2024 12:35:00 %S A266417 1,3,7,2,15,5,6,31,14,4,11,13,30,63,10,12,62,29,28,9,23,8,27,22,26,61, %T A266417 60,126,20,127,24,124,21,58,25,56,18,125,46,16,59,54,44,57,19,52,122, %U A266417 47,120,252,40,254,17,48,248,42,55,116,45,53,50,112,123,36,121,250,92,32,118,108,253,88,114,41,38 %N A266417 a(1) = 1; for n > 1, if A192490(2n+1) = 1 [when 2n+1 is Ludic number] a(n) = 1 + 2*a(A266350(n)-1), otherwise a(n) = 2*a(n-A266350(n)). %H A266417 Antti Karttunen, <a href="/A266417/b266417.txt">Table of n, a(n) for n = 1..10000</a> %H A266417 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A266417 a(1) = 1; for n > 1, if A192490(2*n + 1) = 1 [when 2n+1 is Ludic number] a(n) = 1 + 2*a(A266350(n)-1), otherwise a(n) = 2*a(n-A266350(n)). %F A266417 As a composition of related permutations: %F A266417 a(n) = A237427(A266637(n)). %o A266417 (Scheme, with memoization-macro definec) %o A266417 (definec (A266417 n) (cond ((<= n 1) n) ((zero? (A192490 (+ n n 1))) (* 2 (A266417 (- n (A266350 n))))) (else (+ 1 (* 2 (A266417 (+ -1 (A266350 n)))))))) %Y A266417 Inverse: A266418. %Y A266417 Cf. A003309, A192607, A192490, A266350. %Y A266417 Similar or related permutations: A237427, A266637. %K A266417 nonn %O A266417 1,2 %A A266417 _Antti Karttunen_, Jan 28 2016