A046021 Least inverse of the Kempner function A002034.
1, 2, 3, 4, 5, 9, 7, 32, 27, 25, 11, 243, 13, 49, 125, 4096, 17, 2187, 19, 625, 343, 121, 23, 59049, 3125, 169, 177147, 2401, 29, 78125, 31, 134217728, 1331, 289, 16807, 43046721, 37, 361, 2197, 1953125, 41, 117649, 43, 14641, 9765625, 529, 47
Offset: 1
References
- R. L. Graham, D. E. Knuth and O. Patashnik, "Factorial Factors" Sect. 4.4 in Concrete Mathematics: A Foundation for Computer Science, 2nd ed. Reading, MA: Addison-Wesley, pp. 111-115, 1994.
Links
- Charlie Neder, Table of n, a(n) for n = 1..1000
- J. Sondow and E. W. Weisstein, MathWorld: Smarandache Function.
- Eric Weisstein's World of Mathematics, Greatest Prime Factor.
- Eric Weisstein's World of Mathematics, Factorial.
- Index entries for sequences related to factorial numbers.
Programs
-
Mathematica
With[{p=First[Last[FactorInteger[n, FactorComplete->True]]]}, p^(1+Sum[Floor[(n-1)/p^k], {k, Floor[Log[n-1]/Log[p]]}])] (* Jonathan Sondow, Dec 26 2004 *)
-
PARI
A046021(n,p=A006530(n))=p^A102048(n,p) \\ M. F. Hasler, Nov 27 2018
-
Python
from sympy import primefactors, integer_log def A046021(n): if n == 1: return 1 p = max(primefactors(n)) return p**sum(((n-1)//p**k for k in range(1,integer_log(n-1,p)[0]+1)),start=1) # Chai Wah Wu, Oct 17 2024
Formula
a(n) = P^(1+Sum(k=1 to [log(n-1)/log(P)], [(n-1)/P^k])) for n>1, where P = A006530(n) is the largest prime dividing n. E.g. a(6) = 9 because 9 is the least integer m with A002034(m) = 6, that is, m divides 6!, but m does not divide k! for k < 6. - Jonathan Sondow, Dec 26 2004
Extensions
More terms from David W. Wilson and Christian G. Bower, independently.
Comments