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.

Showing 1-1 of 1 results.

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

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 31381059609, 1853020188851841
Offset: 1

Views

Author

Malo David, May 10 2022

Keywords

Comments

These are the only terms of this sequence.

Examples

			31381059609 = (9-0+6-9+5-0+1-8+3-1+3)^11.
		

Crossrefs

Fixed points of A353906.
Cf. A055017 (alternating sum starting from the last digit of n).
Cf. A055642 (number of digits of n).

Programs

  • 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.
Showing 1-1 of 1 results.