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.

A053577 Cototient function n - phi(n) is a power of 2.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 11, 12, 13, 14, 16, 17, 19, 23, 24, 28, 29, 31, 32, 37, 41, 43, 47, 48, 53, 56, 59, 61, 62, 64, 67, 71, 73, 79, 83, 89, 96, 97, 101, 103, 107, 109, 112, 113, 124, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 192, 193, 197
Offset: 1

Views

Author

Labos Elemer, Jan 18 2000

Keywords

Comments

Consists of all primes, powers of 2, and powers of 2 times Mersenne primes (A000268). - Robert Israel, Jan 29 2018

Examples

			For p prime, cototient(p)=1; for x in the set {49152,57344,63488,65024,65528,65536}, x-phi(x) = 2^15 = 32768.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local x; x:= n - numtheory:-phi(n); x = 2^padic:-ordp(x,2) end proc:
    select(filter, [$1..300]); # Robert Israel, Jan 29 2018
  • Mathematica
    Select[Range[200],IntegerQ[Log[2,#-EulerPhi[#]]]&] (* Harvey P. Dale, Dec 14 2011 *)
  • PARI
    select(x->hammingweight(x-eulerphi(x))==1,[1..200]) \\ M. F. Hasler, Nov 10 2016

Formula

A051953(n) = 2^w.

Extensions

Edited by M. F. Hasler, Nov 10 2016