OFFSET
1,3
COMMENTS
a(n) is the least k such that k divides the sum with multiplicities of the prime factors of the n numbers starting with k.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(4) = 6 because the 4 numbers starting with 6 are 6=2*3, 7, 8=2^3, 9=3^2, and 2+3+7+2+2+2+3+3 = 24 is divisible by 4, and no number less than 6 works.
MAPLE
spf:= proc(n) local t; add(t[1]*t[2], t=ifactors(n)[2]) end proc:
S:= map(spf, [$1..10^6]):
SS:= ListTools:-PartialSums(S):
f:= proc(n) local t, i;
if SS[n] mod n = 0 then return 1 fi;
for i from 2 to 10^6-n do
if SS[i+n-1]-SS[i-1] mod n = 0 then return i fi;
od;
-1
end proc:
map(f, [$1..100]);
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jul 01 2022
STATUS
approved