login
A219792
Least k such that phi(k) = lambda(n), or 0 if there is no such k.
1
1, 1, 3, 3, 5, 3, 7, 3, 7, 5, 11, 3, 13, 7, 5, 5, 17, 7, 19, 5, 7, 11, 23, 3, 25, 13, 19, 7, 29, 5, 31, 15, 11, 17, 13, 7, 37, 19, 13, 5, 41, 7, 43, 11, 13, 23, 47, 5, 43, 25, 17, 13, 53, 19, 25, 7, 19, 29, 59, 5, 61, 31, 7, 17, 13, 11, 67, 17, 23, 13, 71, 7
OFFSET
1,3
COMMENTS
lambda(n) is the Carmichael lambda function A002322.
a(n) = 0 for n = 209, 297, 413, 418, 517, ...
If a(n) = p is a prime greater than 2, then n belongs to the finite set {p, p1, p2, ..., pk} that is a subsequence of A143417 (see the b-file in A143417). For example:
a(n) = 3 for n = 3, 4, 6;
a(n) = 5 for n = 5, 10, 15, 16, 20, 30, 40, 48, 60, 80, 120, 240;
a(n) = 7 for n = 7, 9, 14, 18, 21, 28, ..., 480;
a(n) = 11 for n = 11, 22, 33, 44, 66, 88, 132, 264;
a(n) = 13 for n = 13, 26, 35, 39, ..., 65520.
LINKS
FORMULA
a(n) = A049283(A002322(n)).
EXAMPLE
a(6) = 3 because phi(3) = lambda(6) = 2.
MAPLE
with(numtheory): for n from 1 to 100 do: ii:=0:for k from 1 to 10^6 while(ii=0) do:if phi(k)=lambda(n) then ii:=1: printf(`%d, `, k):else fi:od:if ii=0 then printf(`%d, `, 0): else fi:od:
MATHEMATICA
Table[k=0; While[!EulerPhi[k]==CarmichaelLambda[n], k++]; k, {n, 100}]
Join[{1}, Module[{nn=100, ep, lam}, ep=Table[{k, EulerPhi[k]}, {k, nn}]; Table[ SelectFirst[ep, #[[2]]==CarmichaelLambda[n]&], {n, 2, nn}]][[All, 1]]] (* Harvey P. Dale, Dec 24 2021 *)
PROG
(PARI) a(n)=my(t=lcm(znstar(n)[2])); if(t>2, for(k=t+1, solve(x=t, 2*t^2, x/(exp(Euler)*log(log(x))+3/log(log(x)))-t), if(eulerphi(k)==t, return(k))); 0, 2*t-1) \\ Charles R Greathouse IV, Nov 28 2012
(PARI)
A014197(n, m=1) = { n==1 && return(1+(m<2)); my(p, q); sumdiv(n, d, if( d>=m && isprime(d+1), sum( i=0, valuation(q=n\d, p=d+1), A014197(q\p^i, p))))} \\ This function from M. F. Hasler, Oct 05 2009
A219792(n) = { my(x=lcm(znstar(n)[2])); if(0==A014197(x), 0, for(k=1, oo, if(eulerphi(k)==x, return(k)))); }; \\ Antti Karttunen, Dec 05 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Nov 28 2012
STATUS
approved