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.

Showing 1-1 of 1 results.

A382897 a(n) = n / A382895(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 2, 1, 1, 5, 1, 1, 1, 1, 2, 1, 2, 1, 8, 5, 2, 1, 2, 1, 3, 1, 2, 3, 1, 5, 18, 1, 1, 3, 4, 1, 2, 1, 4, 5, 1, 1, 4, 1, 5, 1, 2, 1, 1, 5, 1, 1, 1, 1, 6, 1, 2, 3, 4, 5, 6, 1, 1, 1, 7, 1, 2, 1, 1, 5, 1, 7, 1, 1, 8, 1, 2, 1, 4, 5, 1, 1, 8, 1, 9, 1, 2, 3, 1, 5, 6, 1, 1, 9
Offset: 1

Views

Author

Seiichi Manyama, Apr 08 2025

Keywords

Crossrefs

Programs

  • Python
    def A(n):
        m = n
        for i in map(int, str(n)):
            if i != 0 and m % i == 0:
                m //= i
        return n // m
    def A382897(n):
        return [A(i) for i in range(1, n + 1)]
    print(A382897(100))
  • Ruby
    def A(n)
      m = n
      n.to_s.split('').map(&:to_i).each{|i|
        m /= i if i != 0 && m % i == 0
      }
      n / m
    end
    def A382897(n)
      (1..n).map{|i| A(i)}
    end
    p A382897(100)
    
Showing 1-1 of 1 results.