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.

A381887 a(n) = 1 if n != p^m*(p-1) for any prime p and any m >= 0, otherwise Product_{p in W} p, where W are the primes such that n = p^m*(p-1) for some m >= 0.

Original entry on oeis.org

2, 6, 1, 10, 1, 21, 1, 2, 1, 11, 1, 13, 1, 1, 1, 34, 1, 57, 1, 5, 1, 23, 1, 1, 1, 1, 1, 29, 1, 31, 1, 2, 1, 1, 1, 37, 1, 1, 1, 41, 1, 301, 1, 1, 1, 47, 1, 1, 1, 1, 1, 53, 1, 3, 1, 1, 1, 59, 1, 61, 1, 1, 1, 2, 1, 67, 1, 1, 1, 71, 1, 73, 1, 1, 1, 1, 1, 79, 1
Offset: 1

Views

Author

Peter Luschny, Apr 05 2025

Keywords

Examples

			a(100) = 505 = 5 * 101 because 100 = (5^2 * (5 - 1)) = 100^0 * (101 - 1).
		

Crossrefs

Cf. A155457.

Programs

  • SageMath
    Max = 100 # Adjust for a larger range.
    def a(n):
        f = 1
        for m in range(Max):
            for p in prime_range(2, Max):
                if p^m*(p-1) == n: f *= p
        return f
    print([a(n) for n in range(1, 80)])

Formula

a(n) = 1 for n > 1 and odd.
a(n) > 1 is the product of at most two primes.