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 A115305 #9 Apr 26 2017 22:26:46 %S A115305 1,2,3,4,9,8,7,6,5,14,13,12,11,10,19,18,17,16,15,24,23,22,21,20,49,48, %T A115305 47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25, %U A115305 74,73,72,71,70,69,68,67,66,65,64,63,62,61,60,59,58,57,56,55,54,53,52 %N A115305 a(n) = if n<5 then n else 5*a(floor(n/5)) + 4 - n mod 5. %C A115305 Self-inverse permutation of the natural numbers; %C A115305 A115310(n+3,4) = a(n); %C A115305 if n is written in base 5 representation, then a(n) is the value after replacing all digits d (but not the leading one) by 4-d. %H A115305 Ivan Neretin, <a href="/A115305/b115305.txt">Table of n, a(n) for n = 1..10000</a> %H A115305 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %t A115305 Table[d = IntegerDigits[n, 5]; FromDigits[Prepend[4 - Rest@d, d[[1]]], 5], {n, 72}] (* _Ivan Neretin_, Apr 26 2017 *) %Y A115305 Cf. A054429, A115303, A115304, A115306, A115307, A115308, A115309, A106649. %K A115305 nonn,base %O A115305 1,2 %A A115305 _Reinhard Zumkeller_, Jan 20 2006