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.

Original entry on oeis.org

5, 7, 8, 13, 14, 16, 19, 20, 22, 31, 43, 46, 61, 64, 73, 94, 103, 109, 118, 139, 151, 166, 181, 193, 199, 214, 229, 241, 256, 271, 283, 313, 334, 349, 358, 421, 433, 454, 463, 523, 526, 571, 601, 619, 643, 661, 694, 718, 766, 811, 823, 829, 859, 883, 934, 958
Offset: 1

Views

Author

Vincenzo Librandi, Oct 13 2018

Keywords

Examples

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

Crossrefs

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

Programs

  • GAP
    Filtered([1..960],k->Phi(k-2)=Phi(k)-2); # Muniru A Asiru, Oct 28 2018
  • Magma
    [n: n in [3..1000] | EulerPhi(n-2) eq EulerPhi(n)-2];
    
  • Maple
    with(numtheory): select(k->phi(k-2)=phi(k)-2,[$1..960]); # Muniru A Asiru, Oct 28 2018
  • Mathematica
    Select[Range@1000, EulerPhi@(# - 2) == EulerPhi[#] - 2 &]
    Flatten[Position[Partition[EulerPhi[Range[1000]],3,1],?(#[[1]]==#[[3]]-2&),1,Heads->False]]+2 (* _Harvey P. Dale, Oct 24 2020 *)
  • PARI
    isok(n) = eulerphi(n-2) == eulerphi(n)-2; \\ Michel Marcus, Oct 14 2018
    

Formula

a(n) = A001838(n)+2. - Robert Israel, Oct 30 2018