%I #58 Jun 27 2024 10:42:15
%S 4,8,9,16,18,25,27,32,36,49,50,54,64,72,75,81,98,100,108,121,125,128,
%T 144,147,150,162,169,196,200,216,225,242,243,245,250,256,288,289,294,
%U 300,324,338,343,361,363,375,392,400,432,441,450,484,486,490,500,507
%N Numbers divisible by the square of their largest prime factor.
%C Numbers n such that P(phi(n)) - phi(P(n)) = 1, where P(x) is the largest prime factor of x. P(phi(n)) - phi(P(n)) = A006530(A000010(n)) - A000010(A006530(n)).
%C Numbers n such that the value of the commutator of phi and P functions at n is -1.
%C Equivalently, n such that n and phi(n) have the same largest prime factor since Phi(p) = p-1 if p is prime. - _Benoit Cloitre_, Jun 08 2002
%C Since n is divisible by P(n)^2, n cannot divide P(n)! and so A057109 is a supersequence. Hence all A002034(a(n)) are composite. - _Jonathan Sondow_, Dec 28 2004
%C A225546 defines a self-inverse bijection between this sequence and A335740, considered as sets. - _Peter Munn_, Jul 19 2020
%H Charles R Greathouse IV, <a href="/A070003/b070003.txt">Table of n, a(n) for n = 1..10000</a>
%H Paul Erdős and Ron L. Graham, <a href="http://www.math.ucsd.edu/~ronspubs/76_12_factorial_products.pdf">On products of factorials</a>, Bull. Inst. Math. Acad. Sinica 4:2 (1976), pp. 337-355. [<a href="http://www.renyi.hu/~p_erdos/1976-25.pdf">alternate link</a>]
%H Paul Erdős and Ilias Kastanas, <a href="http://www.jstor.org/stable/2324376">Solution 6674:The smallest factorial that is a multiple of n</a>, Amer. Math. Monthly 101 (1994) 179.
%H A. J. Kempner, <a href="http://www.jstor.org/stable/2972639">Miscellanea</a>, Amer. Math. Monthly, 25 (1918), 201-210. See Section II, "Concerning the smallest integer m! divisible by a given integer n."
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/GreatestPrimeFactor.html">Greatest Prime Factor</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/TotientFunction.html">Totient Function</a>
%F Erdős proved that there are x * exp(-(1 + o(1))sqrt(log x log log x)) members of this sequence up to x. - _Charles R Greathouse IV_, Mar 26 2012
%p isA070003 := proc(n)
%p if modp(n,A006530(n)^2) = 0 then # code re-use
%p true;
%p else
%p false;
%p end if;
%p end proc:
%p A070003 := proc(n)
%p option remember ;
%p if n =1 then
%p 4;
%p else
%p for a from procname(n-1)+1 do
%p if isA070003(a) then
%p return a
%p end if;
%p end do:
%p end if;
%p end proc:
%p seq( A070003(n),n=1..80) ; # _R. J. Mathar_, Jun 27 2024
%t p[n_] := FactorInteger[n][[-1, 1]]; ep[n_] := EulerPhi[n]; fQ[n_] := p[ep[n]] == 1 + ep[p[n]]; Select[ Range[ 510], fQ] (* _Robert G. Wilson v_, Mar 26 2012 *)
%t Select[Range[500], FactorInteger[#][[-1,2]] > 1 &] (* _T. D. Noe_, Dec 06 2012 *)
%o (PARI) for(n=3,1000,if(component(component(factor(n),1),omega(n))==component(component(factor(eulerphi(n)),1),omega(eulerphi(n))),print1(n,",")))
%o (PARI) is(n)=my(f=factor(n)[,2]);f[#f]>1 \\ _Charles R Greathouse IV_, Mar 21 2012
%o (PARI) sm(lim,mx)=if(mx==2,return(vector(log(lim+.5)\log(2)+1,i,1<<(i-1))));my(v=[1]);forprime(p=2,min(mx,lim),v=concat(v,p*sm(lim\p,p)));vecsort(v)
%o list(lim)=my(v=[]);forprime(p=2,sqrt(lim),v=concat(v,p^2*sm(lim\p^2,p)));vecsort(v) \\ _Charles R Greathouse IV_, Mar 27 2012
%o (Python)
%o from sympy import factorint
%o def ok(n): f = factorint(n); return f[max(f)] >= 2
%o print(list(filter(ok, range(4, 508)))) # _Michael S. Branicky_, Apr 08 2021
%Y Subsequence of A057109, A122145.
%Y Complement within A020725 of A102750.
%Y Cf. A000010, A006530, A068211, A070777, A070812, A070002, A070004, A007283, A070813, A070814, A070815, A070816, A002034, A102067, A102068.
%Y Related to A335740 via A225546.
%Y A195212 is a subsequence.
%Y Cf. A319988 (characteristic function). Positions of odd terms > 1 in A122111.
%K nonn
%O 1,1
%A _Labos Elemer_, May 07 2002
%E New name from Jonathan Sondow and _Charles R Greathouse IV_, Mar 27 2012