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.

A351499 Odd m in A352928.

Original entry on oeis.org

1, 9, 15, 75, 105, 315, 525, 735, 945, 1155, 1365, 1575, 1995, 3465, 4305, 5775, 6615, 7035, 8085, 8925, 9765, 10395, 11235, 12495, 12705, 13545, 15015, 19635, 26565, 28875, 31185, 33495, 38115, 45045, 255255, 405405, 525525, 765765, 975975, 1036035, 1786785, 2297295
Offset: 1

Views

Author

Michael De Vlieger, May 03 2022

Keywords

Crossrefs

Programs

  • Mathematica
    nn = 2^20; c = {1}; j = 1; s = 0; u = 1; {1}~Join~Reap[Do[k = u; While[Nand[FreeQ[c, k], CoprimeQ[j, k], k != j + 1], k++]; j = k; AppendTo[c, k]; If[k == u, If[OddQ[u], Sow[u]]; While[MemberQ[c, u], u++]; c = DeleteCases[c, _?(# < u &)]], {i, 2, nn}]][[-1, -1]]
  • Python
    from math import gcd
    from itertools import islice
    def agen(): # generator of terms
        an, aset, mink, seen = 1, {1}, 2, {1}
        yield 1
        while True:
            if mink%2 and mink not in seen: yield mink; seen.add(mink)
            k = mink
            while k in aset or gcd(an, k) != 1 or k-an == 1: k += 1
            an = k; aset.add(an)
            while mink in aset: mink += 1
    print(list(islice(agen(), 42))) # Michael S. Branicky, May 03 2022