login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = (product of first n semiprimes) mod (sum of first n semiprimes).
2

%I #13 Sep 02 2021 05:44:05

%S 0,4,7,14,11,40,17,17,0,8,85,147,62,16,292,26,138,18,0,570,167,257,

%T 360,156,525,882,372,918,0,0,0,0,0,150,0,0,1070,2136,1172,0,1265,1502,

%U 663,0,0,0,0,1208,306,2995,0,1404,1389,636,0,272,0,1944,5216,2268,1548,1160,3300,0,924,84,0,3723

%N a(n) = (product of first n semiprimes) mod (sum of first n semiprimes).

%C A surprising number of terms are 0: 3124 of the first 10000 terms.

%H Robert Israel, <a href="/A347413/b347413.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A112141(n) mod A062198(n).

%e The first 3 semiprimes are 4, 6, 9, so a(3) = (4*6*9) mod (4+6+9) = 216 mod 19 = 7.

%p R:= NULL:

%p s:= 0: p:= 1: count:= 0:

%p for n from 4 while count < 100 do

%p if numtheory:-bigomega(n) = 2 then

%p count:= count+1: s:= s+n; p:= p*n;

%p R:= R, p mod s;

%p fi

%p od:

%p R;

%o (Python)

%o from sympy import factorint

%o def aupton(terms):

%o alst, i, n, s, p = [], 1, 0, 0, 1

%o while n < terms:

%o if sum(factorint(i).values()) == 2:

%o n += 1; s += i; p *= i

%o alst.append(p%s)

%o i += 1

%o return alst

%o print(aupton(68)) # _Michael S. Branicky_, Sep 01 2021

%Y Cf. A001358, A062198, A112141, A347421.

%K nonn

%O 1,2

%A _J. M. Bergot_ and _Robert Israel_, Aug 31 2021