login
Limit of the recursion B(k) = T[k](B(k-1)), where B(1) = (1,2,3,4,5,...) and T[k] is the transformation that permutes the entries k(2i-1) and k(2i) for all positive integers i, if k is prime.
1

%I #17 May 19 2024 12:15:22

%S 1,4,8,2,12,3,16,6,10,5,24,9,28,7,18,14,36,15,40,20,26,11,48,21,27,13,

%T 32,22,60,25,64,30,42,17,39,33,76,19,50,35,84,38,88,34,52,23,96,45,54,

%U 46,66,44,108,51,63,49,74,29,120,55,124,31,65,62,75

%N Limit of the recursion B(k) = T[k](B(k-1)), where B(1) = (1,2,3,4,5,...) and T[k] is the transformation that permutes the entries k(2i-1) and k(2i) for all positive integers i, if k is prime.

%C Sequence contains all positive integers.

%C a(2p) = p for all prime numbers p.

%H Jennifer Buckley, <a href="/A372297/b372297.txt">Table of n, a(n) for n = 1..10000</a>

%e B(1) = 1,2,3,4, 5,6,7,8, 9,10,11,12,13,14,...

%e B(2) = 1,4,3,2, 5,8,7,6, 9,12,11,10,13,16,...

%e B(3) = 1,4,8,2, 5,3,7,6,10,12,11, 9,13,16,...

%e B(4) = 1,4,8,2, 5,3,7,6,10,12,11, 9,13,16,... (No change)

%e B(5) = 1,4,8,2,12,3,7,6,10, 5,11, 9,13,16,...

%t max = 66; b[1, j_] := j; b[k_, j_] := b[k, j] = b[k-1, j]; Do[If[PrimeQ[k],b[k, 2j*k-k] = b[k-1, 2j*k]; b[k, 2j*k] = b[k-1, 2j*k-k],b[k,j ]=b[k-1,j]], {k, 2, max}, {j, 1, max}]; a[n_] := b[max, n]; Table[a[n], {n, 1, max}]

%Y Cf. A064494.

%K nonn

%O 1,2

%A _Jennifer Buckley_, Apr 25 2024