OFFSET
1,1
COMMENTS
n*a(n) are 2, 4, 9, 8, 25, 18, 49, 16, 27, 50, 121, 36, 169, 98, 465, 32, 289, ...
a(n) <= A034694(A007947(n)). If n is in A050384 then a(n) = A034694(n). - Robert Israel, Jan 12 2017
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(p^k) = p for all primes p and k >= 1. - Robert Israel, Jan 12 2017
a(n) << n^5 by Xylouris' improvement to Linnik's theorem. - Charles R Greathouse IV, Jan 20 2017
EXAMPLE
a(15) = 31 because 15 does not divide phi(p*15) for p < 31 where p is prime and phi(31*15) = 2*4*30 is divisible by 15.
MAPLE
f:= proc(n) local p;
p:= 2;
while numtheory:-phi(p*n) mod n <> 0 do p:= nextprime(p) od:
p
end proc:
map(f, [$1..100]); # Robert Israel, Jan 12 2017
MATHEMATICA
lpp[n_]:=Module[{p=2}, While[Mod[EulerPhi[p*n], n]!=0, p=NextPrime[p]]; p]; Array[lpp, 80] (* Harvey P. Dale, Sep 26 2020 *)
PROG
(PARI) a(n)=my(k = 1); while (eulerphi(prime(k)*n) % n != 0, k++); prime(k);
(PARI) a(n)=my(t=n/gcd(eulerphi(n), n)); if(t==1, return(2)); forstep(p=if(t%2, 2*t, t)+1, if(isprime(t), t, oo), lcm(t, 2), if(isprime(p), return(p))); t \\ Charles R Greathouse IV, Jan 20 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Jan 12 2017
STATUS
approved