A242212 a(1) = 4. a(n) = A222209(a(n-1)).
4, 5, 7, 11, 19, 37, 71, 151, 379, 1051, 3307, 11483, 44453
Offset: 1
Extensions
a(13) from Alois P. Heinz, May 07 2014
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
import Data.List (delete) a222208 n = a222208_list !! (n-1) a222208_list = 1 : 3 : f 3 (2 : [4 ..]) where f u vs = g vs where g (w:ws) = if all (== 0) $ map ((mod w) . a222208) $ a027751_row u then w : f (u + 1) (delete w vs) else g ws -- Reinhard Zumkeller, Feb 13 2013
b:= proc(n) false end: a:= proc(n) option remember; local h, i; if n<3 then h:= 2*n-1 else a(n-1); h:= ilcm(map(a, numtheory[divisors](n) minus {1, n})[]) fi; for i while b(i*h) do od; b(i*h):= true; i*h end: seq(a(n), n=1..100);
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]]]]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jan 22 2017 *)
a(6) = 12 is divisible by a(1) = 1, a(2) = 3, a(3) = 4.
a:= proc(n) a(n):= `if`(n<3, 2*n-1, (h-> ceil((a(n-1)+1)/h)*h) (ilcm(map(a, numtheory[divisors](n) minus {1, n})[]))) end: seq(a(n), n=1..100); # Alois P. Heinz, Feb 07 2013
a[1] = 1; a[2] = 3; a[n_] := a[n] = (Ceiling[(a[n-1]+1)/#]*#&)[LCM @@ Map[a, Most[Divisors[n]]]]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Mar 27 2017, after Alois P. Heinz *)
a(3) = 12 because a(2) = 6 and A222208(6) = 12.
Comments