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!)
A083730 Greatest prime^2 factor of n, or a(n)=1 for squarefree n. 2

%I #19 Feb 11 2021 03:31:55

%S 1,1,1,4,1,1,1,4,9,1,1,4,1,1,1,4,1,9,1,4,1,1,1,4,25,1,9,4,1,1,1,4,1,1,

%T 1,9,1,1,1,4,1,1,1,4,9,1,1,4,49,25,1,4,1,9,1,4,1,1,1,4,1,1,9,4,1,1,1,

%U 4,1,1,1,9,1,1,25,4,1,1,1,4,9,1,1,4,1,1,1,4,1,9,1,4,1,1,1,4,1,49,9

%N Greatest prime^2 factor of n, or a(n)=1 for squarefree n.

%C Not multiplicative, for example a(4)*a(9) <> a(36). - _R. J. Mathar_, Oct 31 2011

%H Charles R Greathouse IV, <a href="/A083730/b083730.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A249740(n)^2. - _Amiram Eldar_, Feb 11 2021

%t a[n_] := If[(pos = Position[(f = FactorInteger[n])[[;; , 2]], _?(# >= 2 &)]) == {}, 1, f[[pos[[-1, 1]], 1]]^2]; Array[a, 100] (* _Amiram Eldar_, Nov 14 2020 *)

%o (PARI) a(n)=my(f=factor(n)); forstep(i=#f~,1,-1, if(f[i,2]>1, return(f[i,1]^2))); 1 \\ _Charles R Greathouse IV_, Jul 23 2017

%Y Cf. A006530, A001248, A005117, A013929, A008833, A046028, A249740.

%K nonn,easy

%O 1,4

%A _Reinhard Zumkeller_, Jun 14 2003

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 September 11 06:30 EDT 2024. Contains 375814 sequences. (Running on oeis4.)