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 A246367 #8 Aug 27 2014 14:54:00 %S A246367 1,2,4,3,8,5,6,7,9,11,16,15,10,25,21,27,12,33,14,13,45,35,18,75,63,81, %T A246367 49,99,22,55,32,39,135,105,125,225,30,189,243,147,20,297,50,65,165,17, %U A246367 42,117,405,315,375,675,54,175,567,729,441,77,24,891,66,245,195,495,51,275,28,351,1215,945,26 %N A246367 Permutation of natural numbers: a(n) = A005940(A135141(n)). %H A246367 Antti Karttunen, <a href="/A246367/b246367.txt">Table of n, a(n) for n = 1..10000</a> %H A246367 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A246367 a(n) = A005940(A135141(n)). %F A246367 Other identities: %F A246367 For all n >= 1, A000035(a(n)) = 1 - A010051(n). [This permutation maps primes to even numbers and nonprimes to odd numbers, in some order, because permutation A135141 has the same property and A005940 preserves the parity]. %o A246367 (PARI) %o A246367 default(primelimit,(2^31)+(2^30)); %o A246367 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 A246367 A135141(n) = if(1==n, 1, if(isprime(n), 2*A135141(primepi(n)), 1+(2*A135141(n-primepi(n)-1)))); %o A246367 A246367(n) = A005940(A135141(n)); \\ Against the grain... %o A246367 for(n=1, 10000, write("b246367.txt", n, " ", A246367(n))); %o A246367 (Scheme) (define (A246367 n) (A005940 (A135141 n))) %Y A246367 Inverse: A246368. %Y A246367 Cf. A000035, A010051. %Y A246367 Related or similar permutations: A005940, A135141, A246363, A246365. %K A246367 nonn %O A246367 1,2 %A A246367 _Antti Karttunen_, Aug 26 2014