A266645 Permutation of natural numbers: a(n) = A064989(A250469(n)).
1, 2, 3, 4, 5, 6, 7, 10, 9, 8, 11, 14, 13, 22, 15, 12, 17, 26, 19, 34, 21, 20, 23, 38, 25, 18, 33, 16, 29, 46, 31, 58, 39, 28, 35, 30, 37, 62, 51, 44, 41, 74, 43, 82, 57, 24, 47, 86, 49, 50, 27, 52, 53, 94, 55, 42, 69, 68, 59, 106, 61, 118, 87, 40, 65, 66, 67, 122, 45, 76, 71, 134, 73, 142, 93, 36, 77, 70, 79, 146, 111, 32, 83, 158, 85, 78, 123
Offset: 1
Keywords
Links
Crossrefs
Programs
-
Mathematica
f[n_] := Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n; g[n_] := If[n == 1, 0, PrimePi@ FactorInteger[n][[1, 1]]]; Function[s, MapIndexed[ Function[{m, n}, f[Lookup[s, g[n] + 1][[m]] - Boole[n == 1]]][#1, First@ #2] &, #] &@ Map[Position[Lookup[s, g@ #], #][[1, 1]] &, Range@ 120]]@ PositionIndex@ Array[g, 10^4] (* Michael De Vlieger, Mar 09 2017, Version 10 *)
Formula
As a composition of related permutations:
Other identities. For all n >= 0: