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.

A366649 Largest prime power (including 1) proper divisor of n, for n >= 2; a(1) = 1.

This page as a plain text file.
%I A366649 #27 Nov 19 2023 15:56:16
%S A366649 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,
%T A366649 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,
%U A366649 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
%N A366649 Largest prime power (including 1) proper divisor of n, for n >= 2; a(1) = 1.
%H A366649 Robert Israel, <a href="/A366649/b366649.txt">Table of n, a(n) for n = 1..10000</a>
%p A366649 f:= proc(n) local F,t;
%p A366649   F:= ifactors(n)[2];
%p A366649   if nops(F) = 1 then n/F[1,1]
%p A366649   else max(map(t -> t[1]^t[2], F))
%p A366649   fi
%p A366649 end proc:
%p A366649 f(1):= 1:
%p A366649 map(f, [$1..100]); # _Robert Israel_, Nov 19 2023
%t A366649 Join[{1}, Table[Last[Select[Divisors[n], # < n && (# == 1 || PrimePowerQ[#]) &]], {n, 2, 85}]]
%t A366649 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 *)
%o A366649 (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
%Y A366649 Cf. A032742, A034699, A063928, A085392, A089384, A093803.
%K A366649 nonn,look
%O A366649 1,4
%A A366649 _Ilya Gutkovskiy_, Oct 17 2023