A003557 n divided by largest squarefree divisor of n; if n = Product p(k)^e(k) then a(n) = Product p(k)^(e(k)-1), with a(1) = 1.
1, 1, 1, 2, 1, 1, 1, 4, 3, 1, 1, 2, 1, 1, 1, 8, 1, 3, 1, 2, 1, 1, 1, 4, 5, 1, 9, 2, 1, 1, 1, 16, 1, 1, 1, 6, 1, 1, 1, 4, 1, 1, 1, 2, 3, 1, 1, 8, 7, 5, 1, 2, 1, 9, 1, 4, 1, 1, 1, 2, 1, 1, 3, 32, 1, 1, 1, 2, 1, 1, 1, 12, 1, 1, 5, 2, 1, 1, 1, 8, 27, 1, 1, 2, 1, 1, 1, 4, 1, 3, 1, 2, 1, 1, 1, 16, 1, 7
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- Henry Bottomley, Some Smarandache-type multiplicative sequences.
- Steven R. Finch, Idempotents and Nilpotents Modulo n, arXiv:math/0605019 [math.NT], 2006-2017.
Crossrefs
Cf. A007947, A062378, A062379, A064549, A300717 (Möbius transform), A326306 (inv. Möbius transf.), A328572.
Programs
-
Haskell
a003557 n = product $ zipWith (^) (a027748_row n) (map (subtract 1) $ a124010_row n) -- Reinhard Zumkeller, Dec 20 2013
-
Julia
using Nemo function A003557(n) n < 4 && return 1 q = prod([p for (p, e) ∈ Nemo.factor(fmpz(n))]) return n == q ? 1 : div(n, q) end [A003557(n) for n in 1:90] |> println # Peter Luschny, Feb 07 2021
-
Magma
[(&+[(Floor(k^n/n)-Floor((k^n-1)/n)): k in [1..n]]): n in [1..100]]; // G. C. Greubel, Nov 02 2018
-
Maple
A003557 := n -> n/ilcm(op(numtheory[factorset](n))): seq(A003557(n), n=1..98); # Peter Luschny, Mar 23 2011 seq(n / NumberTheory:-Radical(n), n = 1..98); # Peter Luschny, Jul 20 2021
-
Mathematica
Prepend[ Array[ #/Times@@(First[ Transpose[ FactorInteger[ # ] ] ])&, 100, 2 ], 1 ] (* Olivier Gérard, Apr 10 1997 *)
-
PARI
a(n)=n/factorback(factor(n)[,1]) \\ Charles R Greathouse IV, Nov 17 2014
-
PARI
for(n=1, 100, print1(direuler(p=2, n, (1 - p*X + X)/(1 - p*X))[n], ", ")) \\ Vaclav Kotesovec, Jun 20 2020
-
Python
from sympy.ntheory.factor_ import core from sympy import divisors def a(n): return n / max(i for i in divisors(n) if core(i) == i) print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Apr 16 2017
-
Python
from math import prod from sympy import primefactors def A003557(n): return n//prod(primefactors(n)) # Chai Wah Wu, Nov 04 2022
-
Sage
def A003557(n) : return n*mul(1/p for p in prime_divisors(n)) [A003557(n) for n in (1..98)] # Peter Luschny, Jun 10 2012
Formula
Multiplicative with a(p^e) = p^(e-1). - Vladeta Jovovic, Jul 23 2001
a(n) = n/rad(n) = n/A007947(n) = sqrt(J_2(n)/J_2(rad(n))), where J_2(n) is A007434. - Enrique Pérez Herrero, Aug 31 2010
a(n) = (J_k(n)/J_k(rad(n)))^(1/k), where J_k is the k-th Jordan Totient Function: (J_2 is A007434 and J_3 A059376). - Enrique Pérez Herrero, Sep 03 2010
a(n) = Product_{k = 1..A001221(n)} (A027748(n,k)^(A124010(n,k)-1)). - Reinhard Zumkeller, Dec 20 2013
a(n) = Sum_{k=1..n}(floor(k^n/n)-floor((k^n-1)/n)). - Anthony Browne, May 11 2016
a(n) = e^[Sum_{k=2..n} (floor(n/k)-floor((n-1)/k))*(1-A010051(k))*Mangoldt(k)] where Mangoldt is the Mangoldt function. - Anthony Browne, Jun 16 2016
a(n) = Sum_{d|n} mu(d) * phi(d) * (n/d), where mu(d) is the Moebius function and phi(d) is the Euler totient function (rephrases formula of Dec 2011). - Daniel Suteu, Jun 19 2018
G.f.: Sum_{k>=1} mu(k)*phi(k)*x^k/(1 - x^k)^2. - Ilya Gutkovskiy, Nov 02 2018
Dirichlet g.f.: Product_{primes p} (1 + 1/(p^s - p)). - Vaclav Kotesovec, Jun 24 2020
From Richard L. Ollerton, May 07 2021: (Start)
a(n) = Sum_{k=1..n} mu(n/gcd(n,k))*gcd(n,k).
a(n) = Sum_{k=1..n} mu(gcd(n,k))*(n/gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)). (End)
Extensions
Secondary definition added to the name by Antti Karttunen, Jun 08 2021
Comments