A328285 Smallest positive number k >= 2 for which there exist exactly n >= 1 integers m in M = {1, 2, 3, ..., k-1} such that k*m is a perfect power.
12, 4, 8, 48, 16, 32, 49, 640, 108, 162, 64, 121, 243, 144, 196, 225, 867, 289, 324, 361, 256, 400, 484, 529, 512, 1250, 676, 625, 576, 1682, 784, 900, 961, 1458, 729, 1156, 1225, 2312, 1369, 1024, 1521, 2048, 1681, 1600, 1849, 1936, 6348, 2025, 2209, 4232
Offset: 1
Keywords
Examples
For n = 1 and k = 12 the set M = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} and we obtain only 12 * 3 = 36 = 6^2, so a(1) = 12. For n = 2 and k = 4 the set M = {1, 2, 3} and we obtain 4 * 1 = 4 = 2^2 and 4 * 2 = 8 = 2^3 so a(2) = 4. For n = 3 and k = 8 the set M = {1, 2, 3, 4, 5, 6, 7}. The powers 8 * 1 = 2^3, 8 * 2 = 16 = 2^4 and 8 * 4 = 32 = 2^5 are obtained, so a(3) = 8.
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..763
Programs
-
Magma
a:=[]; for n in [1..40] do k:=1; while #[m:m in [1..k-1]| IsPower(m*k)] ne n do k:=k+1; end while; Append(~a,k); end for; a;
-
Mathematica
ppQ[n_] := 1 < GCD @@ FactorInteger[n][[All, 2]]; cnt[k_] := cnt[k] = Length[ Select[ Range[k-1], ppQ[k #] &]]; a[n_] := Block[{k = n + 1}, While[ cnt[k] != n, k++]; k]; Array[a, 40] (* Giovanni Resta, Dec 05 2019 *)
-
PARI
a(n) = {my(k=2); while (sum(m=1, k-1, ispower(m*k) != 0) != n, k++); k;} \\ Michel Marcus, Dec 05 2019