The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A222209 Inverse of permutation in A222208. 5
 1, 3, 2, 5, 7, 4, 11, 9, 13, 17, 19, 6, 23, 29, 14, 15, 31, 8, 37, 21, 22, 41, 43, 10, 47, 53, 26, 25, 59, 28, 61, 27, 38, 67, 49, 12, 71, 73, 46, 35, 79, 33, 83, 57, 89, 97, 101, 18, 103, 51, 62, 69, 107, 16, 109, 55, 74, 113, 127, 34, 131, 137, 121, 45, 139 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Permutation of the natural numbers A000027 with inverse permutation A222208. LINKS Alois P. Heinz, Table of n, a(n) for n = 1..10000 Index entries for sequences that are permutations of the natural numbers MAPLE b:= proc(n) false end: g:= proc(n) option remember; local h, i; if n<3 then h:= 2*n-1 else g(n-1); h:= ilcm(map(g, numtheory[divisors](n) minus {1, n})[]) fi; for i while b(i*h) do od; b(i*h):= true; i*h end: a:= proc() local t, a; t, a:= -1, proc() -1 end; proc(n) local h; while a(n) = -1 do t:= t+1; h:= g(t); if a(h) = -1 then a(h):= t fi od; a(n) end end(): seq(a(n), n=1..100); MATHEMATICA terms = 100; b[1] = 1; b[2] = 3; b[n_] := b[n] = Module[{d, s, c, k}, d = Divisors[n] ~Complement~ {1, n}; For[s = Sort[Array[b, n - 1]]; c = Complement[ Range[ Last[s]], s]; k = If[c == {}, Last[s] + 1, First[c]], True, k++, If[FreeQ[s, k], If[AllTrue[d, Divisible[k, b[#]] &], Return[k]]]]]; a[n_] := a[n] = For[k = 1, True, k++, If[b[k] == n, Return[k]]]; Array[a, terms] (* Jean-François Alcover, Feb 22 2018 *) PROG (Haskell) import Data.List (elemIndex) import Data.Maybe (fromJust) a222209 = (+ 1) . fromJust . (`elemIndex` a222208_list) -- Reinhard Zumkeller, Feb 13 2013 CROSSREFS Cf. A000027, A211384, A222208. Sequence in context: A182846 A292962 A069196 * A118320 A108918 A316472 Adjacent sequences: A222206 A222207 A222208 * A222210 A222211 A222212 KEYWORD nonn,look AUTHOR Alois P. Heinz, Feb 12 2013 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 29 03:45 EDT 2023. Contains 365749 sequences. (Running on oeis4.)