

A119361


a(n) is the nth positive integer which is divisible by the same distinct primes as n and which is divisible by no other primes.


1



1, 4, 27, 16, 3125, 48, 823543, 256, 19683, 320, 285311670611, 162, 302875106592253, 1568, 5625, 65536, 827240261886336764177, 432, 1978419655660313589123979, 2500, 50421, 22528, 20880467999847912034355032910567, 972, 298023223876953125, 70304
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS



LINKS



EXAMPLE

6 = 2*3. The sequence of positive integers which are divisible by 2 and 3, but not divisible by any other primes, is 6,12,18,24,36,48,54,... The 6th such integer is 48, so a(6) = 48.


MAPLE

f:= proc(n)
local P, r, Cands, j, B;
P:= sort(convert(numtheory:factorset(n), list));
r:= convert(P, `*`);
Cands:= [seq(r*P[1]^i, i=0..n1)];
for j from 2 to nops(P) do
B:= Cands[n];
Cands:= sort(map(c > seq(c*P[j]^i, i=0..floor(log[P[j]](B/c))), Cands));
Cands:= Cands[1..n];
od;
Cands[n]
end proc:
f(1):= 1:


MATHEMATICA

f[n_] := Module[{P, r, Cands, j, B}, P = FactorInteger[n][[All, 1]]; r = Times @@ P; Cands = Table[r P[[1]]^i, {i, 0, n1}]; Do[B = Cands[[n]]; Cands = Table[# P[[j]]^i, {i, 0, Floor[Log[P[[j]], B/#]]}]& /@ Cands // Flatten // Sort; Cands = Cands[[1;; n]], {j, 2, Length[P]}]; Cands[[n]]];
f[1] = 1;


CROSSREFS



KEYWORD

nonn


AUTHOR



EXTENSIONS



STATUS

approved



