A249817 Permutation of natural numbers: a(1) = 1, a(n) = A083221(A055396(n),A246277(n)).
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, 21, 28, 29, 30, 31, 32, 39, 34, 35, 36, 37, 38, 63, 40, 41, 42, 43, 44, 33, 46, 47, 48, 49, 50, 75, 52, 53, 54, 65, 56, 99, 58, 59, 60, 61, 62, 57, 64, 95, 66, 67, 68, 111, 70, 71, 72, 73, 74, 51, 76, 77, 78, 79, 80, 45, 82, 83, 84, 155, 86, 135
Offset: 1
Keywords
Links
Crossrefs
Inverse: A249818.
There are three different "deep" versions of this permutation, recursing on values of A055396(n) and/or A246277(n), namely: A250245, A250247 and A250249.
Other similar or related permutations: A249815.
Programs
-
Mathematica
lim = 87; a083221 = Table[Take[Prime[n] Select[Range[Ceiling[lim/2]^2], GCD[# Prime@ n, Product[Prime@ i, {i, 1, n - 1}]] == 1 &], Ceiling[lim/2]], {n, Ceiling[lim/2]}]; a055396[n_] PrimePi[FactorInteger[n][[1, 1]]]; a246277[n_] := Which[n == 1, 0, EvenQ@ n, n/2, True, a246277[Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ Transpose@ FactorInteger@ n, Last@ Transpose@ FactorInteger@ n]]]; Table[a083221[[a055396@ n, a246277@ n]], {n, 2, lim}] (* Michael De Vlieger, Jan 04 2016, after Jean-François Alcover at A055396 and Yasutoshi Kohmoto at A083140 *)
-
Scheme
(define (A249817 n) (if (= 1 n) n (A083221bi (A055396 n) (A246277 n)))) ;; Code for A083221bi given in A083221 ;; Alternative version: (define (A249817 n) (if (= 1 n) n (A083221bi (A055396 n) (A249821bi (A055396 n) (A078898 n))))) ;; Code for A249821bi given in A249821.
Comments