OFFSET
1,3
COMMENTS
Each natural numbers occurs exactly twice in this sequence.
For nonsquare numbers, n, with squarefree part A019565(k) and square part m, a(n) is the number with squarefree part A019565(k-1) and square part m. - Peter Munn, Jul 14 2020
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..1024
FORMULA
MATHEMATICA
Array[If[IntegerQ[#2], #2, #1/#2*Product[Prime@i, {i, PrimePi@#2 - 1}] & @@ {#1, FactorInteger[#2 /. (c_ : 1)*a_^(b_ : 0) :> (c*a^b)^2][[1, 1]]}] & @@ {#, Sqrt[#]} &, 58] (* Michael De Vlieger, Jun 26 2020 *)
PROG
(PARI) A334870(n) = if(issquare(n), sqrtint(n), my(c=core(n), m=n); forprime(p=2, , if(!(c % p), m/=p; break, m*=p)); (m));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 08 2020
STATUS
approved