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.
%I A359062 #33 Feb 12 2023 20:51:59 %S A359062 1,8,9,18,20,27,32,36,42,44,45,49,50,54,63,68,72,78,80,81,84,90,92,99, %T A359062 105,108,110,114,116,117,125,126,128,135,144,153,156,162,164,168,169, %U A359062 170,171,176,180,186,188,189,195,198,200,207,210,212,216,222,225,228,230 %N A359062 Nonprime terms of A359059. %C A359062 Subsequence of A359059 after we eliminate primes. %e A359062 8 is a term because 3|(4+2+12). %e A359062 9 is a term because 3|(6+3+12). %e A359062 18 is a term because 3|(6+8+36). %e A359062 20 is a term because 3|(8+10+36). %e A359062 27 is a term because 3|(18+3+36). %p A359062 filter:= proc(n) local F,p,ph,r,ps; %p A359062 F:= numtheory:-factorset(n); %p A359062 if F = {n} then return false fi; %p A359062 ph:= n * mul((p-1)/p, p = F); %p A359062 r:= convert(F,`*`); %p A359062 ps:= n * mul((p+1)/p, p = F); %p A359062 (ph+r+ps) mod 3 = 0 %p A359062 end proc: %p A359062 select(filter, [$1..1000]); # _Robert Israel_, Dec 20 2022 %t A359062 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[230], ! PrimeQ[#] && q[#] &] (* _Amiram Eldar_, Dec 20 2022 *) %o A359062 (Python) %o A359062 from sympy.ntheory.factor_ import totient %o A359062 from sympy import isprime, primefactors, prod %o A359062 def rad(n): return 1 if n < 2 else prod(primefactors(n)) %o A359062 def psi(n): %o A359062 plist = primefactors(n) %o A359062 return n*prod(p+1 for p in plist)//prod(plist) %o A359062 # Output display terms. %o A359062 for n in range(1,231): %o A359062 if(False == isprime(n)): %o A359062 if(0 == (totient(n) + rad(n) + psi(n)) % 3): %o A359062 print(n, end = ", ") %o A359062 (PARI) isok(m) = !isprime(m) && (((eulerphi(m) + factorback(factorint(m)[, 1]) + m*sumdiv(m, d, moebius(d)^2/d)) % 3) == 0); \\ _Michel Marcus_, Dec 27 2022 %Y A359062 Cf. A000010 (phi), A001615 (psi), A007947 (rad). %Y A359062 Subsequence of A359059. %K A359062 nonn %O A359062 1,2 %A A359062 _Torlach Rush_, Dec 15 2022