OFFSET
1,1
LINKS
Daniel Suteu, Table of n, a(n) for n = 1..36
EXAMPLE
a(5) = 3570 = 2*3*5*7*17 because psi(3570) = 3*4*6*8*18 = 2^7*3^4, and phi(3570) = 2*4*6*16 = 2^8*3^1 and 3570 is the least number with 5 distinct prime factors having this property.
MATHEMATICA
Rest@ Values[#][[All, 1]] &@ KeySort@ PositionIndex@ Table[If[SameQ @@ #, PrimeNu@ n, 0] &@ Map[FactorInteger[#][[All, 1]] &, {EulerPhi@ n, n Sum[MoebiusMu[d]^2/d, {d, Divisors@ n}]}], {n, 10^6}] (* Michael De Vlieger, Aug 26 2017, after Michael Somos at A001615 *)
PROG
(PARI)
generate(A, B, n) = A=max(A, vecprod(primes(n))); (f(m, p, j, phi=1, psi=1) = my(list=List()); my(s=sqrtnint(B\m, j)); if(j==1, forprime(q=max(p, ceil(A/m)), s, if(factorback(factor((q-1)*phi)[, 1]) == factorback(factor((q+1)*psi)[, 1]), listput(list, m*q))), forprime(q=p, s, my(t=m*q); list=concat(list, f(t, q+1, j-1, phi*(q-1), psi*(q+1))))); list); vecsort(Vec(f(1, 2, n)));
a(n) = my(x=vecprod(primes(n)), y=2*x); while(1, my(v=generate(x, y, n)); if(#v >= 1, return(v[1])); x=y+1; y=2*x); \\ Daniel Suteu, Jan 25 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Aug 18 2017
EXTENSIONS
a(10) from Giovanni Resta, Aug 26 2017
a(11)-a(19) from Daniel Suteu, Jan 25 2023
STATUS
approved