OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(5) = 4 because the sum of prime factors of 4*5*6*7*8 = 2^6 * 3 * 5 * 7 is 2*6 + 3 + 5 + 7 = 27 = 3^3 is a perfect power, and 4 is the least number that works.
MAPLE
spf:= proc(n) local t; add(t[1]*t[2], t=ifactors(n)[2]) end proc:
ispow:= proc(n) igcd(map(t -> t[2], ifactors(n)[2]))>1 end proc:
f:= proc(n) local S, t, i;
S:= Vector(n, spf); t:= convert(S, `+`);
for i from 1 do
if ispow(t) then return i fi;
t:= t-S[1];
S[1..n-1]:= S[2..n];
S[n]:= spf(i+n);
t:= t+S[n];
od
end proc:
f(1):= 1:
map(f, [$1..100]);
MATHEMATICA
sopfr[n_] := Plus @@ Times @@@ FactorInteger[n]; powQ[n_] := GCD @@ FactorInteger[n][[;; , 2]] > 1; a[n_] := Module[{k = 1}, While[! powQ[sopfr[Product[k + i, {i, 0, n - 1}]]], k++]; k]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Aug 19 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Aug 18 2022
STATUS
approved
