%I M0986 N0370 #52 Jul 03 2017 11:43:02
%S 1,2,4,6,8,10,12,16,18,20,22,24,28,30,32,36,40,42,44,46,48,52,54,56,
%T 58,60,64,66,70,72,78,80,82,84,88,90,92,96,100,102,104,106,108,110,
%U 112,116,120,126,128,130,132,136,138,140,144,148,150,156,160,162,164,166,168
%N Values taken by reduced totient function psi(n).
%C If p is a Sophie Germain prime (A005384), then 2p is here. - _T. D. Noe_, Aug 13 2008
%C Terms of A002322, sorted and multiple values taken just once. - _Vladimir Joseph Stephan Orlovsky_, Jul 21 2009
%C a(2445343) = 10^7, suggesting that Luca & Pomerance's lower bound may be closer to the truth than the upper bound. The fit exponent log a(n)/log n - 1 = 0.0957... in this case. - _Charles R Greathouse IV_, Jul 02 2017
%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H T. D. Noe, <a href="/A002174/b002174.txt">Table of n, a(n) for n = 1..10000</a>
%H D. H. Lehmer, <a href="http://dx.doi.org/10.17226/18678">Guide to Tables in the Theory of Numbers</a>, Bulletin No. 105, National Research Council, Washington, DC, 1941, pp. 7-10.
%H Florian Luca and Carl Pomerance, <a href="http://www.math.dartmouth.edu/~carlp/rangeoflambda13.pdf">On the range of Carmichael's universal-exponent function</a>, Acta Arithmetica 162 (2014), pp.289-308.
%H C. Moreau, <a href="http://www.numdam.org/item?id=NAM_1898_3_17__293_0">Sur quelques théorèmes d'arithmétique</a>, Nouvelles Annales de Mathématiques, 17 (1898), 293-307.
%F n (log n)^0.086 << a(n) << n (log n)^0.36 where << is the Vinogradov symbol, see Luca & Pomerance. - _Charles R Greathouse IV_, Dec 28 2013
%t lst={}; Do[AppendTo[lst, CarmichaelLambda[n]], {n, 6*7!}]; lst; Take[Union[lst], 123] (* _Vladimir Joseph Stephan Orlovsky_, Jul 21 2009 *)
%t (* warning: there seems to be no guarantee that no terms near the end are omitted! - _Joerg Arndt_, Dec 23 2014 *)
%t TakeWhile[Union@ Table[CarmichaelLambda@ n, {n, 10^6}], # <= 168 &] (* _Michael De Vlieger_, Mar 19 2016 *)
%o (PARI) list(lim)=my(v=List([1]),u,t); forprime(p=3,lim\3+1, u=List(); listput(u,p-1); while((t=u[#u]*p)<=lim, listput(u,t)); for(j=1,#v, for(i=1,#u, t=lcm(u[i],v[j]); if(t<=lim && t!=v[j], listput(v,t)))); v=List(Set(v))); forprime(p=lim\3+2,lim+1, listput(v,p-1)); v=List(Set(v)); for(i=1,#v, t=2*v[i]; if(t>lim, break); listput(v,t); while((t*=2)<=lim, listput(v,t))); Set(v) \\ _Charles R Greathouse IV_, Jun 23 2017
%o (PARI) is(n)=if(n%2, return(n==1)); my(f=factor(n),pe); for(i=1,#f~, if(n%(f[i,1]-1)==0, next); pe=f[i,1]^f[i,2]; forstep(q=2*pe+1,n+1,2*pe, if(n%(q-1)==0 && isprime(q), next(2))); return(0)); 1 \\ _Charles R Greathouse IV_, Jun 25 2017
%Y Cf. A002322, A002396, A143407, A143408.
%K nonn,nice
%O 1,2
%A _N. J. A. Sloane_
%E More terms from _T. D. Noe_, Aug 13 2008