OFFSET
4,1
COMMENTS
Also largest prime factor of any composite <= n. E.g., a(15) = 7 since 7 is the largest prime factor of {4,6,8,9,10,12,14,15}, the composites <= 15.
Also largest prime dividing A025527(n) = n!/lcm[1,...,n]. [Comment from Ray Chandler, Apr 26 2007: Primes > n/2 don't appear as factors of A025527(n) since they appear once in n! and again in the denominator lcm[1,...,n]. Primes <= n/2 appear more times in the numerator than the denominator so they appear in the fraction.]
a(n) is the largest prime factor whose exponent in the factorization of n! is greater than 1. - Michel Marcus, Nov 11 2018
LINKS
Michael De Vlieger, Table of n, a(n) for n = 4..10000
FORMULA
a(n) = Max(gpf((n+2) mod k): 1 < k < (n+2) and k not prime), with gpf=A006530 (greatest prime factor). - Reinhard Zumkeller, Mar 27 2004
EXAMPLE
n = 10, n! = 3628800, lcm[1,...,10] = 2520, A025527(10) = 1440 = 32*9*5 so a(7) = 5 (offset = 3).
MATHEMATICA
Table[Prime@ PrimePi[n/2], {n, 4, 78}] (* Michael De Vlieger, Sep 21 2017 *)
PROG
(PARI) a(n) = precprime(n/2); \\ Michel Marcus, Sep 20 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jun 22 2000; David W. Wilson, Jun 10 2005
EXTENSIONS
More terms from James A. Sellers, Jul 04 2000
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, May 14 2007
STATUS
approved