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 A099257 #6 Mar 30 2012 18:50:48 %S A099257 1,3,2,4,9,5,6,7,8,10,21,11,12,13,14,15,16,17,18,19,20,22,45,23,24,25, %T A099257 26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,93,47,48, %U A099257 49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71 %N A099257 a(1)=1, a(n+1) = if a(n)=n then 2*n+1 else smallest number not occurring earlier. %C A099257 Permutation of the natural numbers with inverse A099258; %C A099257 a(A033484(n)) = A033484(n); %C A099257 a(A033484(n) + 1) = 2*A033484(n) + 1 = A068156(n). %H A099257 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A099257 a(n) = if n = 3*2^k - 2 then n else (if n = 3*2^k - 1 then 2*n + 1 else n - 1). %K A099257 nonn %O A099257 1,2 %A A099257 _Reinhard Zumkeller_, Oct 09 2004