A113552 Beginning with 1, least divisor of the previous term not included earlier, otherwise the least multiple of the previous term having at least one prime divisor coprime to it and not included earlier.
1, 2, 6, 3, 12, 4, 20, 5, 10, 30, 15, 60, 420, 7, 14, 42, 21, 84, 28, 140, 35, 70, 210, 105, 630, 9, 18, 90, 45, 180, 36, 252, 63, 126, 1260, 315, 1890, 27, 54, 270, 135, 540, 108, 756, 189, 378, 3780, 945, 5670, 81, 162, 810, 405, 1620, 324, 2268, 567, 1134, 11340, 2835
Offset: 1
Examples
After 4 the next term is 20 and not 8 as 8 and 4 have the same prime divisors. After a(27) = 18 = 2 * 3^2, the next term a(28) is neither 2*18 = 2^2 * 3^2, nor 3*18 = 2 * 3^3 nor 4*18 = 2^3 * 3^2 as none of them have any prime factors that would not occur already in 18. But 5*18 = 90 has such a factor, and 90 has not occurred before, thus a(28) = 90. - _Antti Karttunen_, May 18 2018
Links
- Antti Karttunen & Michael De Vlieger, Table of n, a(n) for n = 1..16384
- Michael De Vlieger, Notes on A113552
Crossrefs
Programs
-
Maple
S:= {1}: A[1]:= 1: for n from 2 to 60 do d:= min(numtheory:-divisors(A[n-1]) minus S); if d < infinity then A[n]:= d else Q:= numtheory:-factorset(A[n-1]); for k from 2 do if not member(k*A[n-1], S) and not (numtheory:-factorset(k) subset Q) then A[n]:= k*A[n-1]; break fi od fi; S:= S union {A[n]} od: # Robert Israel, May 22 2018
-
Mathematica
Nest[Append[#, Block[{d = Complement[Divisors@ #[[-1]], #], k = 2}, If[d != {}, d[[1]], While[Nand[PowerMod[#[[-1]], k, k] != 0, FreeQ[#, k #[[-1]] ] ], k++]; k #[[-1]] ] ] ] &, {1}, 116] (* Robert G. Wilson v, Aug 20 2006, corrected by Michael De Vlieger, May 18 2018 *)
-
PARI
up_to = (2^14)+1; A007947(n) = factorback(factorint(n)[, 1]); v113552 = vector(up_to); m_occurrences = Map(); k=0; prev=1; for(n=1,up_to,fordiv(prev,d,if(!mapisdefined(m_occurrences,d),v113552[n] = d;mapput(m_occurrences,d,n);break)); if(!v113552[n], m = 1; try = prev; while(!(prev%A007947(m)) || mapisdefined(m_occurrences,try), m++; try = prev*m); mapput(m_occurrences,v113552[n] = try,n)); prev = v113552[n]); A113552(n) = v113552[n]; \\ Antti Karttunen, May 18 2018
Extensions
More terms from Robert G. Wilson v, Aug 20 2006
Sequence's terms changed back to the original author's intended meaning, differing from those computed by Wilson and Johnston from n = 28 onward, with a(28) = 90 instead of a(28) = 72. The latter version was recreated with the new A-number A304752, to which also the old Maple and Mathematica programs were transferred. - Antti Karttunen, May 18 2018
Comments