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 A091847 #14 Mar 24 2023 12:42:35 %S A091847 15,39,111,183,255,327,363,471,2199,3063,4359,4375,5571,8751,15723, %T A091847 36759,46791,65535,140103,208191,441027,4190263,9056583,57395631, %U A091847 172186887,236923383,918330183,3932935775,4294967295,4764161215 %N A091847 Perfect totient numbers, omitting powers of 3. %H A091847 Douglas E. Iannucci, Deng Moujie and Graeme L. Cohen, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL6/Cohen2/cohen50.html">On Perfect Totient Numbers</a>, J. Integer Seqs., Vol. 6, 2003. %t A091847 fQ[n_] := !IntegerQ@ Log[3, n] && Plus @@ FixedPointList[ EulerPhi@# &, n] == 2n + 1 (* _Robert G. Wilson v_, Nov 06 2010 *) %o A091847 (Python) %o A091847 from itertools import count, islice %o A091847 from gmpy2 import digits %o A091847 from sympy import totient %o A091847 def A091847_gen(startvalue=3): # generator of terms >= startvalue %o A091847 for n in count((k:=max(startvalue,3))+1-(k&1),2): %o A091847 t = digits(n,3) %o A091847 if t.count('0') != len(t)-1: %o A091847 m, s = n, 1 %o A091847 while (m:=totient(m))>1: %o A091847 s += m %o A091847 if s == n: %o A091847 yield n %o A091847 A091847_list = list(islice(A091847_gen(),10)) # _Chai Wah Wu_, Mar 24 2023 %Y A091847 A082897 has more information. %K A091847 nonn %O A091847 1,1 %A A091847 _N. J. A. Sloane_, Mar 13 2004