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.

A257787 Numbers n such that the sum of the digits of n to some power divided by the sum of the digits equal n.

This page as a plain text file.
%I A257787 #19 May 22 2025 10:21:42
%S A257787 1,2,3,4,5,6,7,8,9,37,48,415,231591,3829377463694454,
%T A257787 56407086228259246207394322684
%N A257787 Numbers n such that the sum of the digits of n to some power divided by the sum of the digits equal n.
%C A257787 The first nine terms are trivial, but then the terms become very rare. It appears that this sequence is finite.
%e A257787 37 = (3^3+7^3)/(3+7).
%e A257787 231591 = (2^7+3^7+1^7+5^7+9^7+1^7)/(2+3+1+5+9+1).
%o A257787 (Python)
%o A257787 def moda(n,a):
%o A257787     kk = 0
%o A257787     while n > 0:
%o A257787         kk= kk+(n%10)**a
%o A257787         n =int(n//10)
%o A257787     return kk
%o A257787 def sod(n):
%o A257787     kk = 0
%o A257787     while n > 0:
%o A257787         kk= kk+(n%10)
%o A257787         n =int(n//10)
%o A257787     return kk
%o A257787 for a in range (1, 10):
%o A257787     for c in range (1, 10**6):
%o A257787         if c*sod(c)==moda(c, a):
%o A257787             print (a,c, moda(c,a),sod(c))
%Y A257787 Cf. A061209, A115518, A111434, A114135, A130680, A257784, A257768.
%K A257787 nonn,base,more
%O A257787 1,2
%A A257787 _Pieter Post_, May 08 2015
%E A257787 a(14) from _Giovanni Resta_, May 09 2015
%E A257787 a(15) from _Chai Wah Wu_, Nov 30 2015