Skip to main content
added 74 characters in body
Source Link
Mr. Xcoder
  • 42.5k
  • 9
  • 81
  • 214

Python 3 + sympy, 5959 58 bytes

*-1 byte by replacing compositepi(k) with k+~primepi(k).

lambda k:totient(compositepik+~primepi(k))
from sympy.ntheory import*

Try it online!Try it online!

Python 3 + sympy, 59 bytes

lambda k:totient(compositepi(k))
from sympy.ntheory import*

Try it online!

Python 3 + sympy, 59 58 bytes

*-1 byte by replacing compositepi(k) with k+~primepi(k).

lambda k:totient(k+~primepi(k))
from sympy.ntheory import*

Try it online!

Source Link
Mr. Xcoder
  • 42.5k
  • 9
  • 81
  • 214

Python 3 + sympy, 59 bytes

lambda k:totient(compositepi(k))
from sympy.ntheory import*

Try it online!