cp's OEIS Frontend

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.

A353907 Numbers k such that k equals {alternating sum of digits of k} raised to the power of {number of digits of k}.

This page as a plain text file.
%I A353907 #12 Jun 11 2022 13:51:12
%S A353907 1,2,3,4,5,6,7,8,9,31381059609,1853020188851841
%N A353907 Numbers k such that k equals {alternating sum of digits of k} raised to the power of {number of digits of k}.
%C A353907 These are the only terms of this sequence.
%e A353907 31381059609 = (9-0+6-9+5-0+1-8+3-1+3)^11.
%o A353907 (Python)
%o A353907 def A(n):
%o A353907    counter = 0
%o A353907    S = 0
%o A353907    q = n
%o A353907    while q:
%o A353907       q, c = q//10, q % 10
%o A353907       S += (-1)** counter * c
%o A353907       counter += 1
%o A353907    return S ** counter
%o A353907 def fixed_points_of_A():
%o A353907    for i in range(1,100):
%o A353907       m = int(10 ** (1 - 1/ i)) +1
%o A353907       for k in range(m, 10):
%o A353907          n = k**i
%o A353907          e = A(n)
%o A353907          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.
%Y A353907 Fixed points of A353906.
%Y A353907 Cf. A055017 (alternating sum starting from the last digit of n).
%Y A353907 Cf. A055642 (number of digits of n).
%K A353907 nonn,easy,base,fini,full
%O A353907 1,2
%A A353907 _Malo David_, May 10 2022