OFFSET
1,2
COMMENTS
These are the only terms of this sequence.
EXAMPLE
31381059609 = (9-0+6-9+5-0+1-8+3-1+3)^11.
PROG
(Python)
def A(n):
counter = 0
S = 0
q = n
while q:
q, c = q//10, q % 10
S += (-1)** counter * c
counter += 1
return S ** counter
def fixed_points_of_A():
for i in range(1, 100):
m = int(10 ** (1 - 1/ i)) +1
for k in range(m, 10):
n = k**i
e = A(n)
if n ==e: print(n, k, i) #prints n, the value of the alternating sum, and of the power to which is raised this number.
CROSSREFS
KEYWORD
nonn,easy,base,fini,full
AUTHOR
Malo David, May 10 2022
STATUS
approved