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.

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.

This page as a plain text file.
%I A003557 #146 Jul 08 2025 18:02:46
%S A003557 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,
%T A003557 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,
%U A003557 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
%N 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.
%C A003557 a(n) is the size of the Frattini subgroup of the cyclic group C_n - Ahmed Fares (ahmedfares(AT)my-deja.com), Jun 07 2001.
%C A003557 Also of the Frattini subgroup of the dihedral group with 2*n elements. - Sharon Sela (sharonsela(AT)hotmail.com), Jan 01 2002
%C A003557 Number of solutions to x^m==0 (mod n) provided that n < 2^(m+1), i.e. the sequence of sequences A000188, A000189, A000190, etc. converges to this sequence. - _Henry Bottomley_, Sep 18 2001
%C A003557 a(n) is the number of nilpotent elements in the ring Z/nZ. - _Laszlo Toth_, May 22 2009
%C A003557 The sequence of partial products of a(n) is A085056(n). - _Peter Luschny_, Jun 29 2009
%C A003557 The first occurrence of n in this sequence is at A064549(n). - _Franklin T. Adams-Watters_, Jul 25 2014
%C A003557 From _Hal M. Switkay_, Jul 03 2025: (Start)
%C A003557 For n > 1, a(n) is a proper divisor of n. Thus the sequence n, a(n), a(a(n)), ... eventually becomes 1. This yields a minimal factorization of n as a product of squarefree numbers (A005117), each factor dividing all larger factors, in a factorization that is conjugate to the minimal factorization of n as a product of prime powers (A000961), as follows.
%C A003557 Let f(n,0) = n, and let f(n,k) = a(f(n,k-1)) for k > 0. A051903(n) is the minimal value of k such that f(n,k) = 1. A051903(n) <= log(n)/log(2). Since n/a(n) = A007947(n) is always squarefree by definition, n is a product of squarefree factors in the form Product_{i=1..A051903(n)} [f(n,i-1)/f(n,i)].
%C A003557 The two factorizations correspond to conjugate partitions of bigomega(n) = A001222(n). (End)
%H A003557 Reinhard Zumkeller, <a href="/A003557/b003557.txt">Table of n, a(n) for n = 1..10000</a>
%H A003557 Henry Bottomley, <a href="http://fs.gallup.unm.edu/Bottomley-Sm-Mult-Functions.htm">Some Smarandache-type multiplicative sequences</a>.
%H A003557 Steven R. Finch, <a href="https://arxiv.org/abs/math/0605019">Idempotents and Nilpotents Modulo n</a>, arXiv:math/0605019 [math.NT], 2006-2017.
%F A003557 Multiplicative with a(p^e) = p^(e-1). - _Vladeta Jovovic_, Jul 23 2001
%F A003557 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
%F A003557 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
%F A003557 Dirichlet convolution of A000027 and A097945. - _R. J. Mathar_, Dec 20 2011
%F A003557 a(n) = A000010(n)/|A023900(n)|. - _Eric Desbiaux_, Nov 15 2013
%F A003557 a(n) = Product_{k = 1..A001221(n)} (A027748(n,k)^(A124010(n,k)-1)). - _Reinhard Zumkeller_, Dec 20 2013
%F A003557 a(n) = Sum_{k=1..n}(floor(k^n/n)-floor((k^n-1)/n)). - _Anthony Browne_, May 11 2016
%F A003557 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
%F A003557 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
%F A003557 G.f.: Sum_{k>=1} mu(k)*phi(k)*x^k/(1 - x^k)^2. - _Ilya Gutkovskiy_, Nov 02 2018
%F A003557 Dirichlet g.f.: Product_{primes p} (1 + 1/(p^s - p)). - _Vaclav Kotesovec_, Jun 24 2020
%F A003557 From _Richard L. Ollerton_, May 07 2021: (Start)
%F A003557 a(n) = Sum_{k=1..n} mu(n/gcd(n,k))*gcd(n,k).
%F A003557 a(n) = Sum_{k=1..n} mu(gcd(n,k))*(n/gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)). (End)
%F A003557 a(n) = A001615(n)/A048250(n) = A003415/A342001(n) = A057521(n)/A071773(n). - _Antti Karttunen_, Jun 08 2021
%p A003557 A003557 := n -> n/ilcm(op(numtheory[factorset](n))):
%p A003557 seq(A003557(n), n=1..98); # _Peter Luschny_, Mar 23 2011
%p A003557 seq(n / NumberTheory:-Radical(n), n = 1..98); # _Peter Luschny_, Jul 20 2021
%t A003557 Prepend[ Array[ #/Times@@(First[ Transpose[ FactorInteger[ # ] ] ])&, 100, 2 ], 1 ] (* _Olivier Gérard_, Apr 10 1997 *)
%o A003557 (Sage) def A003557(n) : return n*mul(1/p for p in prime_divisors(n))
%o A003557 [A003557(n) for n in (1..98)] # _Peter Luschny_, Jun 10 2012
%o A003557 (Haskell)
%o A003557 a003557 n = product $ zipWith (^)
%o A003557                       (a027748_row n) (map (subtract 1) $ a124010_row n)
%o A003557 -- _Reinhard Zumkeller_, Dec 20 2013
%o A003557 (PARI) a(n)=n/factorback(factor(n)[,1]) \\ _Charles R Greathouse IV_, Nov 17 2014
%o A003557 (PARI) for(n=1, 100, print1(direuler(p=2, n, (1 - p*X + X)/(1 - p*X))[n], ", ")) \\ _Vaclav Kotesovec_, Jun 20 2020
%o A003557 (Python)
%o A003557 from sympy.ntheory.factor_ import core
%o A003557 from sympy import divisors
%o A003557 def a(n): return n / max(i for i in divisors(n) if core(i) == i)
%o A003557 print([a(n) for n in range(1, 101)]) # _Indranil Ghosh_, Apr 16 2017
%o A003557 (Python)
%o A003557 from math import prod
%o A003557 from sympy import primefactors
%o A003557 def A003557(n): return n//prod(primefactors(n)) # _Chai Wah Wu_, Nov 04 2022
%o A003557 (Magma) [(&+[(Floor(k^n/n)-Floor((k^n-1)/n)): k in [1..n]]): n in [1..100]]; // _G. C. Greubel_, Nov 02 2018
%o A003557 (Julia)
%o A003557 using Nemo
%o A003557 function A003557(n)
%o A003557     n < 4 && return 1
%o A003557     q = prod([p for (p, e) ∈ Nemo.factor(fmpz(n))])
%o A003557     return n == q ? 1 : div(n, q)
%o A003557 end
%o A003557 [A003557(n) for n in 1:90] |> println  # _Peter Luschny_, Feb 07 2021
%Y A003557 Cf. A007947, A062378, A062379, A064549, A300717 (Möbius transform), A326306 (inv. Möbius transf.), A328572.
%Y A003557 Sequences that are multiples of this sequence (the other factor of a pointwise product is given in parentheses): A000010 (A173557), A000027 (A007947), A001615 (A048250), A003415 (A342001), A007434 (A345052), A057521 (A071773).
%Y A003557 Cf. A082695 (Dgf at s=2), A065487 (Dgf at s=3).
%Y A003557 Cf. A000961, A001222, A005117, A051903.
%K A003557 nonn,easy,mult
%O A003557 1,4
%A A003557 _Marc LeBrun_
%E A003557 Secondary definition added to the name by _Antti Karttunen_, Jun 08 2021