login
Permutation of natural numbers: a(1) = 1, a(n) = A083221(a(A055396(n)), a(A246277(n))).
12

%I #16 Nov 19 2014 00:04:54

%S 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,27,22,23,24,25,26,

%T 21,28,29,30,31,32,39,34,35,36,37,38,63,40,41,54,43,44,33,46,47,48,49,

%U 50,75,52,53,42,65,56,99,58,59,60,61,62,57,64,95,78,67,68,111,70,71,72,103,74,51,76,77,126,79,80,45,82

%N Permutation of natural numbers: a(1) = 1, a(n) = A083221(a(A055396(n)), a(A246277(n))).

%C This is a "doubly-recursed" version of A249817.

%C For primes p_n, a(p_n) = p_{a(n)}.

%C The first 7-cycle occurs at: (33 39 63 57 99 81 45), which is mirrored by the cycle (66 78 126 114 198 162 90) with terms double the size and also by the cycle (137 167 307 269 523 419 197), consisting of primes (p_33, p_39, p_63, ...).

%H Antti Karttunen, <a href="/A250249/b250249.txt">Table of n, a(n) for n = 1..3718</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%F a(1) = 1, a(n) = A083221(a(A055396(n)), a(A246277(n))).

%F Other identities. For all n >= 1:

%F a(2n) = 2*a(n), or equally, a(n) = a(2n)/2. [The even bisection halved gives the sequence back].

%F a(p_n) = p_{a(n)}, or equally, a(n) = A049084(a(A000040(n))). [Restriction to primes induces the same sequence].

%F A078442(a(n)) = A078442(n), A049076(a(n)) = A049076(n). [Preserves the "order of primeness of n"].

%F A000035(n) = A000035(a(n)). [Preserves the parity].

%e For n = 42 = 2*3*7, we see that it occurs as the 21st term on the top row of A246278 (A055396(42) = 1 and A246277(42) = 21), recursing on both yields a(1) = 1, a(21) = 27, thus we find A083221(1,27), the 27th term on A083221's topmost row (also A005843) which is 54, thus a(42) = 54.

%e Examples for cases where n is a prime:

%e a(3709) = a(p_518) = p_{a(518)} = A000040(1162) = 9397.

%e a(3719) = a(p_519) = p_{a(519)} = A000040(1839) = 15767.

%o (Scheme, with memoizing-macro definec from _Antti Karttunen_'s IntSeq-library)

%o (definec (A250249 n) (cond ((<= n 1) n) (else (A083221bi (A250249 (A055396 n)) (A250249 (A246277 n)))))) ;; Code for A083221bi given in A083221

%Y Inverse: A250250.

%Y Fixed points: A250251, their complement: A249729.

%Y Cf. A000035, A000040, A055396, A078442, A083221, A049076.

%Y Differs from A250250 for the first time at n=33, where a(33) = 39, while A250250(33) = 45.

%Y Differs from the "vanilla version" A249817 for the first time at n=42, where a(42) = 54, while A249817(42) = 42.

%K nonn

%O 1,2

%A _Antti Karttunen_, Nov 17 2014