login
A353907
Numbers k such that k equals {alternating sum of digits of k} raised to the power of {number of digits of k}.
1
1, 2, 3, 4, 5, 6, 7, 8, 9, 31381059609, 1853020188851841
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
Fixed points of A353906.
Cf. A055017 (alternating sum starting from the last digit of n).
Cf. A055642 (number of digits of n).
Sequence in context: A227549 A110370 A249517 * A363271 A031044 A367306
KEYWORD
nonn,easy,base,fini,full
AUTHOR
Malo David, May 10 2022
STATUS
approved