OFFSET
1,6
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
FORMULA
a(n) = A069897(n) + 1 if n is not a power of a prime (A024619), and 1 otherwise. - Amiram Eldar, Oct 24 2024
EXAMPLE
a(26) = ceiling(GPF(26)/LPF(26)) = ceiling(13/2) = 7.
MAPLE
A120454 := proc(n) local ifs ; if n = 1 then RETURN(1) ; else ifs := ifactors(n)[2] ; RETURN( ceil(op(1, op(-1, ifs))/op(1, op(1, ifs))) ) ; fi ; end ; for n from 1 to 100 do printf("%d, ", A120454(n)) ; od ; # R. J. Mathar, Dec 16 2006
MATHEMATICA
a[n_] := Module[{p = FactorInteger[n][[;; , 1]]}, Ceiling[p[[-1]] / p[[1]]]]; Array[a, 100] (* Amiram Eldar, Oct 24 2024 *)
PROG
(PARI) A120454(n) = if(1==n, 1, my(f = factor(n), lpf = f[1, 1], gpf = f[#f~, 1]); ceil(gpf/lpf)); \\ Antti Karttunen, Sep 06 2018
CROSSREFS
KEYWORD
easy,nonn,changed
AUTHOR
Jonathan Vos Post, Aug 16 2006
EXTENSIONS
Corrected and extended by R. J. Mathar, Dec 16 2006
STATUS
approved