login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A366649 Largest prime power (including 1) proper divisor of n, for n >= 2; a(1) = 1. 1
1, 1, 1, 2, 1, 3, 1, 4, 3, 5, 1, 4, 1, 7, 5, 8, 1, 9, 1, 5, 7, 11, 1, 8, 5, 13, 9, 7, 1, 5, 1, 16, 11, 17, 7, 9, 1, 19, 13, 8, 1, 7, 1, 11, 9, 23, 1, 16, 7, 25, 17, 13, 1, 27, 11, 8, 19, 29, 1, 5, 1, 31, 9, 32, 13, 11, 1, 17, 23, 7, 1, 9, 1, 37, 25, 19, 11, 13, 1, 16, 27, 41, 1, 7, 17 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
MAPLE
f:= proc(n) local F, t;
F:= ifactors(n)[2];
if nops(F) = 1 then n/F[1, 1]
else max(map(t -> t[1]^t[2], F))
fi
end proc:
f(1):= 1:
map(f, [$1..100]); # Robert Israel, Nov 19 2023
MATHEMATICA
Join[{1}, Table[Last[Select[Divisors[n], # < n && (# == 1 || PrimePowerQ[#]) &]], {n, 2, 85}]]
a[n_] := Module[{f = FactorInteger[n]}, If[Length[f] == 1, f[[1, 1]]^(f[[1, 2]] - 1), Max[Power @@@ f]]]; Array[a, 100] (* Amiram Eldar, Oct 19 2023 *)
PROG
(PARI) a(n) = if (n==1, 1, my(d=divisors(n)); vecmax(select(x->(isprimepower(x) || (x==1)), Vec(d, #d-1)))); \\ Michel Marcus, Oct 17 2023
CROSSREFS
Sequence in context: A332294 A079554 A247892 * A079880 A366291 A353271
KEYWORD
nonn,look
AUTHOR
Ilya Gutkovskiy, Oct 17 2023
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 29 21:21 EDT 2024. Contains 374734 sequences. (Running on oeis4.)