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.

A006530 Gpf(n): greatest prime dividing n, for n >= 2; a(1)=1.

This page as a plain text file.
%I A006530 M0428 #231 Jul 17 2025 14:48:36
%S A006530 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,
%T A006530 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,
%U A006530 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
%N A006530 Gpf(n): greatest prime dividing n, for n >= 2; a(1)=1.
%C A006530 The initial term a(1)=1 is purely conventional: The unit 1 is not a prime number, although it has been considered so in the past. 1 is the empty product of prime numbers, thus 1 has no largest prime factor. - _Daniel Forgues_, Jul 05 2011
%C A006530 Greatest noncomposite number dividing n, (cf. A008578). - _Omar E. Pol_, Aug 31 2013
%C A006530 Conjecture: Let a, b be nonzero integers and f(n) denote the maximum prime factor of a*n + b if a*n + b <> 0 and f(n)=0 if a*n + b=0 for any integer n. Then the set {n, f(n), f(f(n)), ...} is finite of bounded size. - _M. Farrokhi D. G._, Jan 10 2021
%D A006530 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 A006530 D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section IV.1.
%D A006530 H. L. Montgomery, Ten Lectures on the Interface Between Analytic Number Theory and Harmonic Analysis, Amer. Math. Soc., 1996, p. 210.
%D A006530 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A006530 Daniel Forgues, <a href="/A006530/b006530.txt">Table of n, a(n) for n = 1..100000</a> (first 10000 terms from T. D. Noe)
%H A006530 M. Abramowitz and I. A. Stegun, eds., <a href="http://www.convertit.com/Go/ConvertIt/Reference/AMS55.ASP">Handbook of Mathematical Functions</a>, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
%H A006530 K. Alladi and P. Erdős, <a href="http://projecteuclid.org/euclid.pjm/1102811427">On an additive arithmetic function</a>, Pacific J. Math., Volume 71, Number 2 (1977), 275-294. MR 0447086 (56 #5401).
%H A006530 G. Back and M. Caragiu, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Papers1/48-4/Back_Caragiu.pdf">The greatest prime factor and recurrent sequences</a>, Fib. Q., 48 (2010), 358-362.
%H A006530 A. E. Brouwer, <a href="/A046670/a046670.pdf">Two number theoretic sums</a>, Stichting Mathematisch Centrum. Zuivere Wiskunde, Report ZW 19/74 (1974): 3 pages. [Cached copy, included with the permission of the author]
%H A006530 Paul Erdős, Andrew Granville, Carl Pomerance and Claudia Spiro, <a href="http://math.dartmouth.edu/~carlp/iterate.pdf">On the normal behavior of the iterates of some arithmetic functions</a>, Analytic number theory, Birkhäuser Boston, 1990, pp. 165-204.
%H A006530 Paul Erdős, Andrew Granville, Carl Pomerance and Claudia Spiro, <a href="/A000010/a000010_1.pdf">On the normal behavior of the iterates of some arithmetic functions</a>, Analytic number theory, Birkhäuser Boston, 1990, pp. 165-204. [Annotated copy with A-numbers]
%H A006530 Mats Granvik, <a href="/A006530/a006530_2.txt">Mathematica program to check the conjectured formula</a>, Feb 28 2021.
%H A006530 Nathan McNew, <a href="https://doi.org/10.1080/10586458.2016.1155188">The Most Frequent Values of the Largest Prime Divisor Function</a>, Exper. Math., 2017, Vol. 26, No. 2, 210-224.
%H A006530 OEIS Wiki, <a href="/wiki/Greatest_prime_factor_of_n">Greatest prime factor of n</a>
%H A006530 H. P. Robinson, <a href="/A006530/a006530.pdf">Letter to N. J. A. Sloane, Oct 1981</a>
%H A006530 David Singmaster, <a href="/A005178/a005178.pdf">Letter to N. J. A. Sloane</a>, Oct 03 1982.
%H A006530 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/GreatestPrimeFactor.html">Greatest Prime Factor</a>
%H A006530 <a href="/index/Cor#core">Index entries for "core" sequences</a>
%F A006530 a(n) = A027748(n, A001221(n)) = A027746(n, A001222(n)); a(n)^A071178(n) = A053585(n). - _Reinhard Zumkeller_, Aug 27 2011
%F A006530 a(n) = A000040(A061395(n)). - _M. F. Hasler_, Jan 16 2015
%F A006530 a(n) = n + 1 - Sum_{k=1..n} (floor((k!^n)/n) - floor(((k!^n)-1)/n)). - _Anthony Browne_, May 11 2016
%F A006530 n/a(n) = A052126(n). - _R. J. Mathar_, Oct 03 2016
%F A006530 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
%F A006530 a(n) has average order Pi^2*n/(12 log n) [Brouwer]. See also A046670. - _N. J. A. Sloane_, Jun 26 2017
%p A006530 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;
%p A006530 # alternative
%p A006530 A006530 := n->max(1,op(numtheory[factorset](n))); # _Peter Luschny_, Nov 02 2010
%t A006530 Table[ FactorInteger[n][[ -1, 1]], {n, 100}] (* _Ray Chandler_, Nov 12 2005 and modified by _Robert G. Wilson v_, Jul 16 2014 *)
%o A006530 (PARI) A006530(n)=if(n>1,vecmax(factor(n)[,1]),1) \\ Edited to cover n=1. - _M. F. Hasler_, Jul 30 2015
%o A006530 (Magma) [ #f eq 0 select 1 else f[ #f][1] where f is Factorization(n): n in [1..86] ]; // _Klaus Brockhaus_, Oct 23 2008
%o A006530 (Scheme)
%o A006530 ;; 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
%o A006530 (definec (A006530 n) (let ((spf (A020639 n))) (if (= spf n) spf (A006530 (/ n spf)))))
%o A006530 ;; _Antti Karttunen_, Mar 12 2017
%o A006530 (Python)
%o A006530 from sympy import factorint
%o A006530 def a(n): return 1 if n == 1 else max(factorint(n))
%o A006530 print([a(n) for n in range(1, 87)]) # _Michael S. Branicky_, Aug 08 2022
%o A006530 (SageMath)
%o A006530 def A006530(n): return list(factor(n))[-1][0] if n > 1 else 1
%o A006530 print([A006530(n) for n in range(1, 87)])  # _Peter Luschny_, Jan 07 2024
%Y A006530 Cf. A000040, A020639 (smallest prime divisor), A034684, A028233, A034699, A053585.
%Y A006530 See also A032742, A052126, A070087, A070089, A061395, A175723.
%Y A006530 Cf. A046670 (partial sums), A104350 (partial products).
%Y A006530 See A385503 for "popular" primes.
%K A006530 nonn,nice,easy,core
%O A006530 1,2
%A A006530 _N. J. A. Sloane_
%E A006530 Edited by _M. F. Hasler_, Jan 16 2015