[go: up one dir, main page]

login
A083730
Greatest prime^2 factor of n, or a(n)=1 for squarefree n.
2
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, 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, 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
OFFSET
1,4
COMMENTS
Not multiplicative, for example a(4)*a(9) <> a(36). - R. J. Mathar, Oct 31 2011
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A249740(n)^2. - Amiram Eldar, Feb 11 2021
MATHEMATICA
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 *)
PROG
(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
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Jun 14 2003
STATUS
approved