login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A085392 a(n) = largest prime divisor of n, or 1 if n is 1 or a prime. 7
1, 1, 1, 2, 1, 3, 1, 2, 3, 5, 1, 3, 1, 7, 5, 2, 1, 3, 1, 5, 7, 11, 1, 3, 5, 13, 3, 7, 1, 5, 1, 2, 11, 17, 7, 3, 1, 19, 13, 5, 1, 7, 1, 11, 5, 23, 1, 3, 7, 5, 17, 13, 1, 3, 11, 7, 19, 29, 1, 5, 1, 31, 7, 2, 13, 11, 1, 17, 23, 7, 1, 3, 1, 37, 5, 19, 11, 13, 1, 5, 3, 41, 1, 7, 17, 43, 29, 11, 1, 5, 13 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

FORMULA

a(n) = A006530(A032742(n)). - R. J. Mathar, Jun 26 2011

MAPLE

A085392 := proc(n) max( op(numtheory[divisors](n) minus {n})) ; A006530(%) ;

end proc:

seq(A085392(n), n=1..50) ; # R. J. Mathar, Jun 26 2011

MATHEMATICA

PrimeFactors[n_] := Flatten[ Table[ # [[1]], {1}] & /@ FactorInteger[n]]; f[n_] := Block[{gpd = Divisors[n][[ -2]]}, If[gpd == 1, 1, PrimeFactors[gpd][[ -1]] ]]; Table[ If[n == 1, 1, f[n]], {n, 1, 95}]

Join[{1}, Table[FactorInteger[Divisors[n][[-2]]][[-1, 1]], {n, 2, 120}]] (* Harvey P. Dale, Jul 02 2019 *)

PROG

(Haskell)

a085392 = a006530 . a032742  -- Reinhard Zumkeller, Oct 03 2012

(PARI) gpd(n) = if (n==1, 1, n/factor(n)[1, 1]);

gpf(n) = if (n==1, 1, vecmax(factor(n)[, 1]));

a(n) = gpf(gpd(n)); \\ Michel Marcus, Apr 08 2018

CROSSREFS

Cf. A014673, A085393.

Sequence in context: A056609 A014673 A280686 * A089384 A228812 A144113

Adjacent sequences:  A085389 A085390 A085391 * A085393 A085394 A085395

KEYWORD

nonn

AUTHOR

Robert G. Wilson v and Reinhard Zumkeller, Jun 26 2003

EXTENSIONS

Definition corrected by N. J. A. Sloane, Jul 02 2019. Also deleted an incorrect comment.

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 18 14:45 EDT 2020. Contains 337169 sequences. (Running on oeis4.)