cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

0, 4, 7, 14, 11, 40, 17, 17, 0, 8, 85, 147, 62, 16, 292, 26, 138, 18, 0, 570, 167, 257, 360, 156, 525, 882, 372, 918, 0, 0, 0, 0, 0, 150, 0, 0, 1070, 2136, 1172, 0, 1265, 1502, 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
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Aug 31 2021

Keywords

Comments

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

Examples

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

Crossrefs

Programs

  • 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;
  • 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

Formula

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