A303762 a(0) = 1, and for n >= 1, a(n) is either the largest divisor of a(n-1) not already present in the sequence, or (if all divisors already used), a(n-1) * {the least prime p such that p does not divide a(n-1) and p*a(n-1) is not already present}.
1, 2, 6, 3, 15, 5, 10, 30, 210, 105, 35, 7, 14, 42, 21, 231, 77, 11, 22, 66, 33, 165, 55, 110, 330, 2310, 1155, 385, 770, 154, 462, 6006, 3003, 1001, 143, 13, 26, 78, 39, 195, 65, 130, 390, 2730, 1365, 455, 91, 182, 546, 273, 4641, 1547, 221, 17, 34, 102, 51, 255, 85, 170, 510, 3570, 1785, 595, 119, 238, 714, 357, 3927, 1309, 187, 374, 1122, 561, 2805, 935
Offset: 0
Keywords
Examples
From _Michael De Vlieger_, May 23 2018: (Start) Table below shows the initial 31 terms at right. First column is index n. Second shows "." if a(n) = largest divisor of a(n-1), or factor p. Third shows presence "1" or absence "." of prime k among prime divisors of a(n). n p\d MN(n) a(n) --------------------------- 0 . . 1 1 2 1 2 2 3 11 6 3 . .1 3 4 5 .11 15 5 . ..1 5 6 2 1.1 10 7 3 111 30 8 7 1111 210 9 . .111 105 10 . ..11 35 11 . ...1 7 12 2 1..1 14 13 3 11.1 42 14 . .1.1 21 15 11 .1.11 231 16 . ...11 77 17 . ....1 11 18 2 1...1 22 19 3 11..1 66 20 . .1..1 33 21 5 .11.1 165 22 . ..1.1 55 23 2 1.1.1 110 24 3 111.1 330 25 7 11111 2310 26 . .1111 1155 27 . ..111 385 28 2 1.111 770 29 . 1..11 154 30 3 11.11 462 31 13 11.111 6006 ... (End)
Links
- Antti Karttunen, Table of n, a(n) for n = 0..26232
Crossrefs
Programs
-
Mathematica
Nest[Append[#, Block[{d = Divisors@ #[[-1]], p = 2}, If[Complement[d, #] != {}, Complement[d, #][[-1]], While[Nand[Mod[#[[-1]], p] != 0, FreeQ[#, p #[[-1]] ] ], p = NextPrime@ p]; p #[[-1]] ] ] ] &, {1}, 75] (* Michael De Vlieger, May 22 2018 *)
-
PARI
default(parisizemax,2^31); up_to = 2^14; A053669(n) = forprime(p=2, , if (n % p, return(p))); \\ From A053669 v303762 = vector(up_to); m_inverses = Map(); prev=1; for(n=1,up_to,fordiv(prev,d,if(!mapisdefined(m_inverses,(prev/d)),v303762[n] = (prev/d);mapput(m_inverses,(prev/d),n);break)); if(!v303762[n], apu = prev; while(mapisdefined(m_inverses,try = prev*A053669(apu)), apu *= A053669(apu)); v303762[n] = try; mapput(m_inverses,try,n)); prev = v303762[n]); A303762(n) = v303762[n+1];
Comments