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.

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.

Original entry on oeis.org

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
Offset: 1

Views

Author

Antti Karttunen, Jun 08 2020

Keywords

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

Crossrefs

Programs

  • 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 *)
  • 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));

Formula

a(A334747(n)) = n.
a(A000040(n)) = A002110(n-1).
a(n^2) = n.
a(n) = A225546(A252463(A225546(n))). - Peter Munn, Jun 08 2020