A303751 Suspected divisor-or-multiple permutation: a(1) = 1, and for n > 1, a(n) is either the least divisor of a(n-1) not already present, or (if all divisors already used), a(n) = a(n-1) * {the least power of the least prime not dividing a(n-1) such that the term is not already present}.
1, 2, 6, 3, 12, 4, 36, 9, 18, 90, 5, 10, 30, 15, 60, 20, 180, 45, 360, 8, 24, 120, 40, 1080, 27, 54, 270, 135, 540, 108, 2700, 25, 50, 150, 75, 300, 100, 900, 225, 450, 3150, 7, 14, 42, 21, 84, 28, 252, 63, 126, 630, 35, 70, 210, 105, 420, 140, 1260, 315, 2520, 56, 168, 840, 280, 7560, 72, 1800, 200, 600, 4200
Offset: 1
Keywords
Examples
a(64) = 280 = 2^3 * 5 * 7 = prime(1)^3 * prime(3) * prime(4), which by Heinz-encoding corresponds to integer partition {1+1+1+3+4}. We try to remove all 1's (to get {3+4}, i.e., prime(3)*prime(4) = 35, but that has already been used as a(52)), or to remove either 3 or 4 or both, but also 8, 40 and 56 have already been used, and if we remove all 1's and either 3 or 4, then also prime(3) and prime(4), 5 and 7 have already been used. So we must add one or more copies of 2 (the least missing part) to find a partition that has not already been used. And it turns out we need to add three copies, to get {1+1+1+2+2+2+3+4} to obtain value prime(1)^3 * prime(2)^3 * prime(3) * prime(4) = 7560 not used before, so a(65) = 7560. For the next partition, we remove two 2's and both 3 and 4, to get {1+1+1+2+2} which gives Heinz-code 2^3 * 3^2 = 72, which is the smallest divisor of 7560 that has not been used before in the sequence, thus a(66) = 72.
Links
Crossrefs
Programs
-
PARI
up_to = 2^14; A053669(n) = forprime(p=2, , if (n % p, return(p))); \\ From A053669 v303751 = vector(up_to); m303752 = Map(); prev=1; for(n=1,up_to,fordiv(prev,d,if(!mapisdefined(m303752,d),v303751[n] = d;mapput(m303752,d,n);break)); if(!v303751[n], p = A053669(prev); while(mapisdefined(m303752,prev), prev *= p); v303751[n] = prev; mapput(m303752,prev,n)); prev = v303751[n]); A303751(n) = v303751[n]; A303752(n) = mapget(m303752,n);
Formula
Observed scaling patterns:
For n = 2 .. 2 + 0, a(n) = 2*a(n-1).
For n = 4 .. 4 + 0, a(n) = 3*a(n-3).
For n = 11 .. 11 + 7, a(n) = 5*a(n-10).
For n = 42 .. 42 + 23, a(n) = 7*a(n-41).
For n = 176 .. 176 + 80, a(n) = 11*a(n-175).
For n = 1343 .. 1343 + 683, a(n) = 13*a(n-1342).
For n = 8470 .. 8470 + 3610, a(n) = 17*a(n-8469).
For n = 57949 .. 57949 + 18554, a(n) = 19*a(n-57948).
Comments