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.

A175795 Numbers n such that the digits of sigma(n) are exactly the same (albeit in different order) as the digits of phi(n), in base 10.

Original entry on oeis.org

1, 65, 207, 1769, 2066, 2771, 3197, 4330, 4587, 4769, 4946, 5067, 6443, 6623, 6989, 7133, 8201, 9263, 11951, 12331, 13243, 16403, 17429, 17441, 21416, 22083, 23161, 24746, 27058, 27945, 28049, 28185, 28451, 29111, 30551, 31439, 32554, 32566, 32849, 33715
Offset: 1

Views

Author

Michel Lagneau, Sep 06 2010

Keywords

Examples

			2771 is in the sequence because sigma(2771) = 2952, phi(2771) = 2592
		

Crossrefs

Cf. A000010 (Euler totient function), A000203 (sigma function), A115920, A115921, A114065.

Programs

  • Mathematica
    okQ[n_] := Module[{idn = IntegerDigits[DivisorSigma[1,n]]}, Sort[idn] == Sort[IntegerDigits[EulerPhi[n]]]]; Select[Range[40000], okQ]
  • PARI
    isok(n) = (de = digits(eulerphi(n))) && (ds = digits(sigma(n))) && (vecsort(de) == vecsort(ds)); \\ Michel Marcus, Dec 13 2015
  • Python
    from sympy import totient, divisor_sigma
    A175795_list = [n for n in range(1,10**4) if sorted(str(divisor_sigma(n))) == sorted(str(totient(n)))] # Chai Wah Wu, Dec 13 2015