OFFSET
1,1
LINKS
Douglas E. Iannucci, Deng Moujie and Graeme L. Cohen, On Perfect Totient Numbers, J. Integer Seqs., Vol. 6, 2003.
MATHEMATICA
fQ[n_] := !IntegerQ@ Log[3, n] && Plus @@ FixedPointList[ EulerPhi@# &, n] == 2n + 1 (* Robert G. Wilson v, Nov 06 2010 *)
PROG
(Python)
from itertools import count, islice
from gmpy2 import digits
from sympy import totient
def A091847_gen(startvalue=3): # generator of terms >= startvalue
for n in count((k:=max(startvalue, 3))+1-(k&1), 2):
t = digits(n, 3)
if t.count('0') != len(t)-1:
m, s = n, 1
while (m:=totient(m))>1:
s += m
if s == n:
yield n
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Mar 13 2004
STATUS
approved