login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A222208 a(1) = 1, a(2) = 3; for n>2, a(n) = smallest number not in {a(1), ..., a(n-1)} such that a(n) is divisible by a(d) for all divisors d of n. 6

%I

%S 1,3,2,6,4,12,5,18,8,24,7,36,9,15,16,54,10,48,11,72,20,21,13,108,28,

%T 27,32,30,14,96,17,162,42,60,40,144,19,33,90,216,22,120,23,84,64,39,

%U 25,324,35,168,50,270,26,192,56,180,44,126,29,288,31,51,80,486

%N a(1) = 1, a(2) = 3; for n>2, a(n) = smallest number not in {a(1), ..., a(n-1)} such that a(n) is divisible by a(d) for all divisors d of n.

%C Permutation of the natural numbers A000027 with inverse permutation A222209.

%H Alois P. Heinz, <a href="/A222208/b222208.txt">Table of n, a(n) for n = 1..10000</a>

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

%p b:= proc(n) false end:

%p a:= proc(n) option remember; local h, i;

%p if n<3 then h:= 2*n-1 else a(n-1); h:= ilcm(map(a,

%p numtheory[divisors](n) minus {1, n})[]) fi;

%p for i while b(i*h) do od;

%p b(i*h):= true; i*h

%p end:

%p seq(a(n), n=1..100);

%t a[1] = 1; a[2] = 3; a[n_] := a[n] = Module[{d, s, c, k}, d = Divisors[n] ~Complement~ {1, n}; For[s = Sort[Array[a, 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, a[#]]&], Return[k]]]]];

%t Table[a[n], {n, 1, 100}] (* _Jean-Fran├žois Alcover_, Jan 22 2017 *)

%o (Haskell)

%o import Data.List (delete)

%o a222208 n = a222208_list !! (n-1)

%o a222208_list = 1 : 3 : f 3 (2 : [4 ..]) where

%o f u vs = g vs where

%o g (w:ws) = if all (== 0) $ map ((mod w) . a222208) $ a027751_row u

%o then w : f (u + 1) (delete w vs) else g ws

%o -- _Reinhard Zumkeller_, Feb 13 2013

%Y Cf. A000027, A211384, A222209.

%Y Cf. A027751.

%K nonn

%O 1,2

%A _Alois P. Heinz_, Feb 12 2013

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 29 04:33 EDT 2020. Contains 334697 sequences. (Running on oeis4.)