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.

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

This page as a plain text file.
%I A320391 #20 Sep 08 2022 08:46:23
%S A320391 5,7,8,13,14,16,19,20,22,31,43,46,61,64,73,94,103,109,118,139,151,166,
%T A320391 181,193,199,214,229,241,256,271,283,313,334,349,358,421,433,454,463,
%U A320391 523,526,571,601,619,643,661,694,718,766,811,823,829,859,883,934,958
%N A320391 Numbers k such that phi(k - 2) = phi(k) - 2.
%H A320391 Robert Israel, <a href="/A320391/b320391.txt">Table of n, a(n) for n = 1..10000</a>
%F A320391 a(n) = A001838(n)+2. - _Robert Israel_, Oct 30 2018
%e A320391 7 is in the sequence because phi(5) = 4 = phi(7) - 2.
%e A320391 8 is in the sequence because phi(6) = 2 = phi(8) - 2.
%e A320391 9 is not in the sequence because phi(7) = 6 but phi(9) - 2 = 4 instead.
%p A320391 with(numtheory): select(k->phi(k-2)=phi(k)-2,[$1..960]); # _Muniru A Asiru_, Oct 28 2018
%t A320391 Select[Range@1000, EulerPhi@(# - 2) == EulerPhi[#] - 2 &]
%t A320391 Flatten[Position[Partition[EulerPhi[Range[1000]],3,1],_?(#[[1]]==#[[3]]-2&),1,Heads->False]]+2 (* _Harvey P. Dale_, Oct 24 2020 *)
%o A320391 (Magma) [n: n in [3..1000] | EulerPhi(n-2) eq EulerPhi(n)-2];
%o A320391 (PARI) isok(n) = eulerphi(n-2) == eulerphi(n)-2; \\ _Michel Marcus_, Oct 14 2018
%o A320391 (GAP) Filtered([1..960],k->Phi(k-2)=Phi(k)-2); # _Muniru A Asiru_, Oct 28 2018
%Y A320391 Cf. A001838.  Contains A006512 and terms > 10 in A194593.
%K A320391 nonn
%O A320391 1,1
%A A320391 _Vincenzo Librandi_, Oct 13 2018