OFFSET
1,2
COMMENTS
Numbers k such that the sum of integer logs of the composite numbers between prime(k) and prime(k+1) is divisible by k.
EXAMPLE
a(3) = 8 is a term because prime(8) = 19 and prime(9) = 23, and the sum of integer logs of 20, 21 and 22 is 2*2+5+3+7+2+11 = 32 which is a multiple of 8.
MAPLE
f:= proc(m) local t; add(t[1]*t[2], t=ifactors(m)[2]) end proc:
t:= 0: n:= 0: p:= 2: count:= 0: R:= NULL:
for m from 3 to 10^6 do
if isprime(m) then
n:= n+1;
if t mod n = 0 then R:= R, n; count:= count+1 fi;
p:= m; t:= 0
else
t:= t+f(m)
fi
od:
R;
MATHEMATICA
f[m_] := Sum[t[[1]]*t[[2]], {t, FactorInteger[m]}];
t = 0; n = 0; p = 2; count = 0; R = {};
For[m = 3, m <= 10^6, m++, If[PrimeQ[m], n++; If[Mod[t, n] == 0, AppendTo[R, n]; count++]; p = m; t = 0, t = t+f[m]]];
R (* Jean-François Alcover, Mar 07 2024, translated from Maple code *)
CROSSREFS
KEYWORD
nonn,more
AUTHOR
J. M. Bergot and Robert Israel, Mar 29 2022
STATUS
approved