A359059 Numbers k such that phi(k) + rad(k) + psi(k) is a multiple of 3.
1, 2, 3, 5, 7, 8, 9, 11, 13, 17, 18, 19, 20, 23, 27, 29, 31, 32, 36, 37, 41, 42, 43, 44, 45, 47, 49, 50, 53, 54, 59, 61, 63, 67, 68, 71, 72, 73, 78, 79, 80, 81, 83, 84, 89, 90, 92, 97, 99, 101, 103, 105, 107, 108, 109, 110, 113, 114, 116, 117, 125, 126, 127, 128, 131, 135, 137, 139
Offset: 1
Keywords
Examples
8 is a term because 4+2+12 is divisible by 3.
Crossrefs
Programs
-
Mathematica
q[n_] := Module[{f = FactorInteger[n], p, e}, p = f[[;; , 1]]; e = f[[;; , 2]]; Divisible[Times @@ ((p - 1)*p^(e - 1)) + Times @@ p + Times @@ ((p + 1)*p^(e - 1)), 3]]; Select[Range[170], q] (* Amiram Eldar, Dec 15 2022 *)
-
PARI
isok(m) = ((eulerphi(m) + factorback(factorint(m)[, 1]) + m*sumdiv(m, d, moebius(d)^2/d)) % 3) == 0; \\ Michel Marcus, Dec 27 2022
-
Python
from sympy.ntheory.factor_ import totient from sympy import primefactors, prod def rad(n): return 1 if n < 2 else prod(primefactors(n)) def psi(n): plist = primefactors(n) return n*prod(p+1 for p in plist)//prod(plist) # Output display terms. for n in range(1,170): if(0 == (totient(n) + rad(n) + psi(n)) % 3): print(n, end = ", ")
Comments