A006530 Gpf(n): greatest prime dividing n, for n >= 2; a(1)=1.
1, 2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 3, 13, 7, 5, 2, 17, 3, 19, 5, 7, 11, 23, 3, 5, 13, 3, 7, 29, 5, 31, 2, 11, 17, 7, 3, 37, 19, 13, 5, 41, 7, 43, 11, 5, 23, 47, 3, 7, 5, 17, 13, 53, 3, 11, 7, 19, 29, 59, 5, 61, 31, 7, 2, 13, 11, 67, 17, 23, 7, 71, 3, 73, 37, 5, 19, 11, 13, 79, 5, 3, 41, 83, 7, 17, 43
Offset: 1
References
- M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 844.
- D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section IV.1.
- H. L. Montgomery, Ten Lectures on the Interface Between Analytic Number Theory and Harmonic Analysis, Amer. Math. Soc., 1996, p. 210.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Daniel Forgues, Table of n, a(n) for n = 1..100000 (first 10000 terms from T. D. Noe)
- M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
- K. Alladi and P. Erdős, On an additive arithmetic function, Pacific J. Math., Volume 71, Number 2 (1977), 275-294. MR 0447086 (56 #5401).
- G. Back and M. Caragiu, The greatest prime factor and recurrent sequences, Fib. Q., 48 (2010), 358-362.
- A. E. Brouwer, Two number theoretic sums, Stichting Mathematisch Centrum. Zuivere Wiskunde, Report ZW 19/74 (1974): 3 pages. [Cached copy, included with the permission of the author]
- Paul Erdős, Andrew Granville, Carl Pomerance and Claudia Spiro, On the normal behavior of the iterates of some arithmetic functions, Analytic number theory, Birkhäuser Boston, 1990, pp. 165-204.
- Paul Erdős, Andrew Granville, Carl Pomerance and Claudia Spiro, On the normal behavior of the iterates of some arithmetic functions, Analytic number theory, Birkhäuser Boston, 1990, pp. 165-204. [Annotated copy with A-numbers]
- Mats Granvik, Mathematica program to check the conjectured formula, Feb 28 2021.
- Nathan McNew, The Most Frequent Values of the Largest Prime Divisor Function, Exper. Math., 2017, Vol. 26, No. 2, 210-224.
- OEIS Wiki, Greatest prime factor of n
- H. P. Robinson, Letter to N. J. A. Sloane, Oct 1981
- David Singmaster, Letter to N. J. A. Sloane, Oct 03 1982.
- Eric Weisstein's World of Mathematics, Greatest Prime Factor
- Index entries for "core" sequences
Crossrefs
Programs
-
Magma
[ #f eq 0 select 1 else f[ #f][1] where f is Factorization(n): n in [1..86] ]; // Klaus Brockhaus, Oct 23 2008
-
Maple
with(numtheory,divisors); A006530 := proc(n) local i,t1,t2,t3,t4,t5; t1 := divisors(n); t2 := convert(t1,list); t3 := sort(t2); t4 := nops(t3); t5 := 1; for i from 1 to t4 do if isprime(t3[t4+1-i]) then return t3[t4+1-i]; fi; od; 1; end; # alternative A006530 := n->max(1,op(numtheory[factorset](n))); # Peter Luschny, Nov 02 2010
-
Mathematica
Table[ FactorInteger[n][[ -1, 1]], {n, 100}] (* Ray Chandler, Nov 12 2005 and modified by Robert G. Wilson v, Jul 16 2014 *)
-
PARI
A006530(n)=if(n>1,vecmax(factor(n)[,1]),1) \\ Edited to cover n=1. - M. F. Hasler, Jul 30 2015
-
Python
from sympy import factorint def a(n): return 1 if n == 1 else max(factorint(n)) print([a(n) for n in range(1, 87)]) # Michael S. Branicky, Aug 08 2022
-
SageMath
def A006530(n): return list(factor(n))[-1][0] if n > 1 else 1 print([A006530(n) for n in range(1, 87)]) # Peter Luschny, Jan 07 2024
-
Scheme
;; The following uses macro definec for the memoization (caching) of the results. A naive implementation of A020639 can be found under that entry. It could be also defined with definec to make it faster on the later calls. See http://oeis.org/wiki/Memoization#Scheme (definec (A006530 n) (let ((spf (A020639 n))) (if (= spf n) spf (A006530 (/ n spf))))) ;; Antti Karttunen, Mar 12 2017
Formula
a(n) = A027748(n, A001221(n)) = A027746(n, A001222(n)); a(n)^A071178(n) = A053585(n). - Reinhard Zumkeller, Aug 27 2011
a(n) = n + 1 - Sum_{k=1..n} (floor((k!^n)/n) - floor(((k!^n)-1)/n)). - Anthony Browne, May 11 2016
n/a(n) = A052126(n). - R. J. Mathar, Oct 03 2016
If A020639(n) = n [when n is 1 or a prime] then a(n) = n, otherwise a(n) = a(A032742(n)). - Antti Karttunen, Mar 12 2017
a(n) has average order Pi^2*n/(12 log n) [Brouwer]. See also A046670. - N. J. A. Sloane, Jun 26 2017
Extensions
Edited by M. F. Hasler, Jan 16 2015
Comments