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 A246365 #8 Aug 27 2014 14:53:42 %S A246365 1,2,4,3,8,5,7,9,6,17,19,11,39,35,25,15,16,13,23,33,29,37,75,27,95,87, %T A246365 61,55,767,45,83,67,10,21,47,71,159,143,139,51,319,175,639,287,251, %U A246365 263,247,135,527,239,199,447,105,115,991,119,1015,443,4575,85,583,2175,1343,151,12,31,63,69,131,77 %N A246365 Permutation of natural numbers: a(n) = A135141(A005940(n)). %C A246365 Even terms occur at the positions 2^n + 1 (A000051), in some order, and the odd terms everywhere else. %H A246365 Antti Karttunen, <a href="/A246365/b246365.txt">Table of n, a(n) for n = 1..10000</a> %H A246365 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A246365 a(n) = A135141(A005940(n)). %o A246365 (PARI) %o A246365 default(primelimit,(2^31)+(2^30)); %o A246365 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ Modified from code of _M. F. Hasler_ %o A246365 A135141(n) = if(1==n, 1, if(isprime(n), 2*A135141(primepi(n)), 1+(2*A135141(n-primepi(n)-1)))); %o A246365 A246365(n) = A135141(A005940(n)); %o A246365 for(n=1, 10000, write("b246365.txt", n, " ", A246365(n))); %o A246365 (Scheme) (define (A246365 n) (A135141 (A005940 n))) %Y A246365 Inverse: A246366. %Y A246365 Related or similar permutations: A005940, A135141, A246363, A246367. %Y A246365 Cf. A000051, A003961. %K A246365 nonn %O A246365 1,2 %A A246365 _Antti Karttunen_, Aug 26 2014