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.

A276094 a(n) = n modulo A002110(A257993(n)), a(0) = 0.

Original entry on oeis.org

0, 1, 2, 1, 4, 1, 6, 1, 2, 1, 4, 1, 12, 1, 2, 1, 4, 1, 18, 1, 2, 1, 4, 1, 24, 1, 2, 1, 4, 1, 30, 1, 2, 1, 4, 1, 6, 1, 2, 1, 4, 1, 12, 1, 2, 1, 4, 1, 18, 1, 2, 1, 4, 1, 24, 1, 2, 1, 4, 1, 60, 1, 2, 1, 4, 1, 6, 1, 2, 1, 4, 1, 12, 1, 2, 1, 4, 1, 18, 1, 2, 1, 4, 1, 24, 1, 2, 1, 4, 1, 90, 1, 2, 1, 4, 1, 6, 1, 2, 1, 4, 1, 12, 1, 2, 1, 4, 1, 18, 1
Offset: 0

Views

Author

Antti Karttunen, Aug 22 2016

Keywords

Crossrefs

Programs

  • Mathematica
    {0}~Join~Table[k = 1; While[! CoprimeQ[Prime@ k, n], k++]; Mod[n, Product[Prime@ i, {i, k}]], {n, 79}] (* Michael De Vlieger, Jun 22 2017 *)
  • Python
    from sympy import nextprime, primepi, primorial
    def a053669(n):
        p = 2
        while True:
            if n%p: return p
            else: p=nextprime(p)
    def a257993(n): return primepi(a053669(n))
    def a002110(n): return 1 if n<1 else primorial(n)
    def a(n): return 0 if n==0 else n%a002110(a257993(n))
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 22 2017

Formula

a(0) = 0, and for n >= 1, a(n) = n modulo A002110(A257993(n)).
or a(n) = A276088(n) * A002110(A276084(n)).
Other identities. For all n >= 0:
a(n) = n - A276093(n).