login
Numbers n for which phi(n) is different from phi(m) for all m < n.
7

%I #26 Dec 18 2012 02:38:51

%S 1,3,5,7,11,13,15,17,19,23,25,29,31,35,37,41,43,47,51,53,59,61,65,67,

%T 69,71,73,79,81,83,85,87,89,97,101,103,107,109,113,121,123,127,129,

%U 131,137,139,141,143,149,151,157,159,161,163,167,173,177,179,181,185

%N Numbers n for which phi(n) is different from phi(m) for all m < n.

%C In the definition, phi(n) is Euler's totient function (A000010).

%C Also, the positions where phi(n) attains a new value.

%C All terms are odd.

%C The sequence of odd primes (A065091) is a subsequence.

%H T. D. Noe, <a href="/A210719/b210719.txt">Table of n, a(n) for n = 1..1000</a>

%F A090127(n) = A000010(a(n)).

%e 7 is in the sequence because phi(7) = 6, and 7 is the smallest n such that phi(n) = 6 (the sequence A000010 starts 1, 1, 2, 2, 4, 2, 6, ...).

%t nn = 185; s = EulerPhi[Range[nn]]; Select[Range[nn], ! MemberQ[Take[s, # - 1], s[[#]]] &] (* _T. D. Noe_, Dec 17 2012 *)

%o (Scheme with _Antti Karttunen_'s intseq-library): (define A210719 (DISTINCT-POS 1 1 A000010))

%o (PARI) is_a210719(n) = {local(i,r,p);r=1;p=eulerphi(n);for(i=1,n-1,if(eulerphi(i)==p,r=0));r} \\ _Michael B. Porter_, Dec 16 2012

%o (Haskell)

%o a210719 n = a210719_list !! (n-1)

%o a210719_list = f (zip [1..] a000010_list) [] where

%o f ((i,x):ixs) phis | x `elem` phis = f ixs phis

%o | otherwise = i : f ixs (x : phis)

%o -- _Reinhard Zumkeller_, Dec 18 2012

%Y Cf. A000010, A090127.

%K nonn

%O 1,2

%A _Antti Karttunen_, Dec 16 2012