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 A132340 #7 Mar 30 2012 18:50:58 %S A132340 1,2,4,3,6,5,10,9,8,7,14,13,12,11,22,21,20,19,18,17,16,15,30,29,28,27, %T A132340 26,25,24,23,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,62,61,60, %U A132340 59,58,57,56,55,54,53,52,51,50,49,48,47,94,93,92,91,90,89,88,87,86,85 %N A132340 a(n+1) = if {a(k):1<=k<=n} is a permutation of [1:n] then 2*a(n) else a(n)-1. %C A132340 Self-inverse permutation of natural numbers; %C A132340 a(A052955(n)) = A027383(n); %C A132340 a(A052955(n)-1)=a(A052955(n))/2; a(A052955(n)+1)=a(A052955(n))-1. %C A132340 Almost certainly A132666 is a duplicate of this entry. - _R. J. Mathar_, Jun 12 2008 %H A132340 R. Zumkeller, <a href="/A132340/b132340.txt">Table of n, a(n) for n = 1..10000</a> %H A132340 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %K A132340 nonn %O A132340 1,2 %A A132340 _Reinhard Zumkeller_, Aug 20 2007