OFFSET
1,1
COMMENTS
Theorem: A prime p is in the sequence iff p is a Fermat prime.
Proof: If p=2^2^n+1 is prime (Fermat prime) then phi(p)=2^2^n=2* phi(2^2^n)=2*phi(p-1), so p is in the sequence. Now if p is a prime term of the sequence then phi(p)=2*phi(p-1) so p-1=2*phi(p-1) and we deduce that p-1=2^m hence p is a Fermat prime.
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..10000 (first 5416 terms from Hiroaki Yamanouchi)
FORMULA
a(n) = A050472(n) + 1. - Ray Chandler, May 01 2015
MATHEMATICA
Select[Range[85000], EulerPhi[ # ]==2EulerPhi[ #-1]&]
Flatten[Position[Partition[EulerPhi[Range[90000]], 2, 1], _?(2#[[1]] == #[[2]]&), 1, Heads->False]]+1 (* Harvey P. Dale, Sep 09 2017 *)
PROG
(Magma) [n: n in [2..2*10^5] | EulerPhi(n) eq 2*EulerPhi(n-1)]; // Vincenzo Librandi, May 17 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Farideh Firoozbakht, Feb 23 2010
STATUS
approved