cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A171271 Numbers n such that phi(n)=2*phi(n-1).

This page as a plain text file.
%I A171271 #21 Sep 08 2022 08:45:49
%S A171271 3,5,17,155,257,287,365,805,1067,2147,3383,4551,6107,7701,8177,9269,
%T A171271 11285,12557,12971,16403,19229,19277,20273,25133,26405,27347,29155,
%U A171271 29575,35645,36419,38369,39647,40495,47215,52235,54653,65537,84863
%N A171271 Numbers n such that phi(n)=2*phi(n-1).
%C A171271 Theorem: A prime p is in the sequence iff p is a Fermat prime.
%C A171271 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.
%H A171271 Giovanni Resta, <a href="/A171271/b171271.txt">Table of n, a(n) for n = 1..10000</a> (first 5416 terms from Hiroaki Yamanouchi)
%F A171271 a(n) = A050472(n) + 1. - _Ray Chandler_, May 01 2015
%t A171271 Select[Range[85000],EulerPhi[ # ]==2EulerPhi[ #-1]&]
%t A171271 Flatten[Position[Partition[EulerPhi[Range[90000]],2,1],_?(2#[[1]] == #[[2]]&),1,Heads->False]]+1 (* _Harvey P. Dale_, Sep 09 2017 *)
%o A171271 (Magma) [n: n in [2..2*10^5] | EulerPhi(n) eq 2*EulerPhi(n-1)]; // _Vincenzo Librandi_, May 17 2015
%Y A171271 Cf. A019434, A050472, A171262.
%K A171271 easy,nonn
%O A171271 1,1
%A A171271 _Farideh Firoozbakht_, Feb 23 2010