login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Numbers k such that phi(k - 2) = phi(k) - 2.
1

%I #20 Sep 08 2022 08:46:23

%S 5,7,8,13,14,16,19,20,22,31,43,46,61,64,73,94,103,109,118,139,151,166,

%T 181,193,199,214,229,241,256,271,283,313,334,349,358,421,433,454,463,

%U 523,526,571,601,619,643,661,694,718,766,811,823,829,859,883,934,958

%N Numbers k such that phi(k - 2) = phi(k) - 2.

%H Robert Israel, <a href="/A320391/b320391.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A001838(n)+2. - _Robert Israel_, Oct 30 2018

%e 7 is in the sequence because phi(5) = 4 = phi(7) - 2.

%e 8 is in the sequence because phi(6) = 2 = phi(8) - 2.

%e 9 is not in the sequence because phi(7) = 6 but phi(9) - 2 = 4 instead.

%p with(numtheory): select(k->phi(k-2)=phi(k)-2,[$1..960]); # _Muniru A Asiru_, Oct 28 2018

%t Select[Range@1000, EulerPhi@(# - 2) == EulerPhi[#] - 2 &]

%t Flatten[Position[Partition[EulerPhi[Range[1000]],3,1],_?(#[[1]]==#[[3]]-2&),1,Heads->False]]+2 (* _Harvey P. Dale_, Oct 24 2020 *)

%o (Magma) [n: n in [3..1000] | EulerPhi(n-2) eq EulerPhi(n)-2];

%o (PARI) isok(n) = eulerphi(n-2) == eulerphi(n)-2; \\ _Michel Marcus_, Oct 14 2018

%o (GAP) Filtered([1..960],k->Phi(k-2)=Phi(k)-2); # _Muniru A Asiru_, Oct 28 2018

%Y Cf. A001838. Contains A006512 and terms > 10 in A194593.

%K nonn

%O 1,1

%A _Vincenzo Librandi_, Oct 13 2018