OFFSET
1,2
COMMENTS
A surprising number of terms are 0: 3124 of the first 10000 terms.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
The first 3 semiprimes are 4, 6, 9, so a(3) = (4*6*9) mod (4+6+9) = 216 mod 19 = 7.
MAPLE
R:= NULL:
s:= 0: p:= 1: count:= 0:
for n from 4 while count < 100 do
if numtheory:-bigomega(n) = 2 then
count:= count+1: s:= s+n; p:= p*n;
R:= R, p mod s;
fi
od:
R;
PROG
(Python)
from sympy import factorint
def aupton(terms):
alst, i, n, s, p = [], 1, 0, 0, 1
while n < terms:
if sum(factorint(i).values()) == 2:
n += 1; s += i; p *= i
alst.append(p%s)
i += 1
return alst
print(aupton(68)) # Michael S. Branicky, Sep 01 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Aug 31 2021
STATUS
approved