login
A091847
Perfect totient numbers, omitting powers of 3.
3
15, 39, 111, 183, 255, 327, 363, 471, 2199, 3063, 4359, 4375, 5571, 8751, 15723, 36759, 46791, 65535, 140103, 208191, 441027, 4190263, 9056583, 57395631, 172186887, 236923383, 918330183, 3932935775, 4294967295, 4764161215
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
A091847_list = list(islice(A091847_gen(), 10)) # Chai Wah Wu, Mar 24 2023
CROSSREFS
A082897 has more information.
Sequence in context: A186295 A259429 A126950 * A062222 A369720 A369758
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Mar 13 2004
STATUS
approved