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.
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
Keywords
Examples
a(100) = 505 = 5 * 101 because 100 = (5^2 * (5 - 1)) = 100^0 * (101 - 1).
Links
- Manjul Bhargava, The factorial function and generalizations, Amer. Math. Monthly, 107 (Nov. 2000), 783-799, (page 793).
- Angelo B. Mingarelli, Abstract factorials, Notes on Number Theory and Discrete Mathematics, Vol. 19, 2013, No. 4, 43-76, (page 54).
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.