%I #8 Jan 02 2015 22:17:03
%S 1,2,4,8,16,32,64,128,256,3,512,6,1024,5,12,2048,10,24,4096,9,20,17,
%T 48,8192,18,33,40,65,34,129,96,16384,257,513,36,66,80,7,1025,13,130,
%U 2049,68,11,258,25,192,32768,514,4097,21,49,1026,72,132,8193,19,41,160,35,14,97,2050,26,260,16385,4098,37,67,81,136,22
%N Permutation of natural numbers: a(1)=1, and for n>1, if n is k-th number whose largest prime factor is less than the square of its smallest prime factor [i.e., n = A251726(k)], a(n) = 2*a(k), otherwise, when n = A251727(k), a(n) = 1 + 2*a(k).
%H Antti Karttunen, <a href="/A252757/b252757.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F a(1)=1, and for n>1: if A252372(n) = 1 [i.e. the largest prime factor of n is less than the square of its smallest prime factor], a(n) = 2*a(A252373(k)), otherwise, a(n) = 1 + 2*a(n-A252373(n)-1).
%o (Scheme, with memoization-macro definec)
%o (definec (A252757 n) (cond ((<= n 1) n) ((= 1 (A252372 n)) (* 2 (A252757 (A252373 n)))) (else (+ 1 (* 2 (A252757 (- n (A252373 n) 1)))))))
%Y Inverse: A252758.
%Y Similar permutations: A243287, A135141, A237427.
%Y Cf. A252372, A252373, A251726, A251727.
%K nonn
%O 1,2
%A _Antti Karttunen_, Jan 02 2015
|