|
|
A334870
|
|
If n is a square, a(n) = A000196(n), and for nonsquare n, let p be the smallest prime dividing the squarefree part of n. Divide n by p and multiply by the product of all smaller primes.
|
|
9
|
|
|
1, 1, 2, 2, 6, 3, 30, 4, 3, 5, 210, 8, 2310, 7, 10, 4, 30030, 9, 510510, 24, 14, 11, 9699690, 12, 5, 13, 18, 120, 223092870, 15, 6469693230, 16, 22, 17, 42, 6, 200560490130, 19, 26, 20, 7420738134810, 21, 304250263527210, 840, 54, 23, 13082761331670030, 32, 7, 25, 34, 9240, 614889782588491410, 27, 66, 28, 38, 29
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
Each natural numbers occurs exactly twice in this sequence.
In binary trees like A334860 and A334866, for n > 2, a(n) gives the parent node of node n.
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
|
|
|
FORMULA
|
a(n^2) = n.
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|