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.

This page as a plain text file.
%I A381887 #9 Apr 06 2025 14:58:11
%S A381887 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,
%T A381887 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,
%U A381887 1,1,1,2,1,67,1,1,1,71,1,73,1,1,1,1,1,79,1
%N 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.
%H A381887 Manjul Bhargava, <a href="http://dx.doi.org/10.2307/2695734">The factorial function and generalizations</a>, Amer. Math. Monthly, 107 (Nov. 2000), 783-799, (page 793).
%H A381887 Angelo B. Mingarelli, <a href="https://nntdm.net/volume-19-2013/number-4/43-76/">Abstract factorials</a>, Notes on Number Theory and Discrete Mathematics, Vol. 19, 2013, No. 4, 43-76, (page 54).
%F A381887 a(n) = 1 for n > 1 and odd.
%F A381887 a(n) > 1 is the product of at most two primes.
%e A381887 a(100) = 505 = 5 * 101 because 100 = (5^2 * (5 - 1)) = 100^0 * (101 - 1).
%o A381887 (SageMath)
%o A381887 Max = 100 # Adjust for a larger range.
%o A381887 def a(n):
%o A381887     f = 1
%o A381887     for m in range(Max):
%o A381887         for p in prime_range(2, Max):
%o A381887             if p^m*(p-1) == n: f *= p
%o A381887     return f
%o A381887 print([a(n) for n in range(1, 80)])
%Y A381887 Cf. A155457.
%K A381887 nonn
%O A381887 1,1
%A A381887 _Peter Luschny_, Apr 05 2025