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 A338246 #12 Oct 18 2020 22:33:03 %S A338246 0,1,3,2,4,9,8,10,6,5,7,12,11,13,27,26,28,24,23,25,30,29,31,18,17,19, %T A338246 15,14,16,21,20,22,36,35,37,33,32,34,39,38,40,81,80,82,78,77,79,84,83, %U A338246 85,72,71,73,69,68,70,75,74,76,90,89,91,87,86,88,93,92,94 %N A338246 Nonpositive values in A117966, in order of appearance and negated. %C A338246 This sequence is a self-inverse permutation of the nonnegative integers (the offset has been set to 0 so as to get a permutation). %H A338246 Rémy Sigrist, <a href="/A338246/b338246.txt">Table of n, a(n) for n = 0..9841</a> %H A338246 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A338246 a(0) = 0. %F A338246 a(n) = -A117966(A157671(n)) for any n > 0. %F A338246 a(n) = n iff n belongs to A003462. %e A338246 A117966 = 0, 1, -1, 3, 4, 2, -3, -2, -4, 9, 10, 8, 12, 13, 11, 6, 7, 5, -9, ... %e A338246 We keep: 0, 1, 3, 2, 4, 9, ... %o A338246 (PARI) A117966(n) = subst(Pol(apply(x->if(x == 2, -1, x), digits(n, 3)), 'x), 'x, 3) %o A338246 print (-select(v -> v<=0, apply(A117966, [0..188]))) %Y A338246 Cf. A003462 (fixed points), A117966, A157671, A338245. %K A338246 nonn,base %O A338246 0,3 %A A338246 _Rémy Sigrist_, Oct 18 2020