A257784 Numbers n such that the sum of the digits squared times the sum of the digits of n to some power equals n.
0, 1, 512, 2511, 4913, 5832, 17576, 19683, 24624, 32144, 37000, 111616, 382360, 415000, 420224, 2219400, 14041600, 16328000, 19300032, 30681423, 39203125, 62025728, 78535423, 186836625, 214292000, 432265248, 1120141312, 3479669440, 18529084125, 25342447725
Offset: 1
Examples
For power 2: 24624 = (2+4+6+2+4)^2*(2^2+4^2+6^2+2^2+4^2). For power 3: 111616 = (1+1+1+6+1+6)^2*(1^3+1^3+1^3+6^3+1^3+6^3).
Links
- Giovanni Resta and Chai Wah Wu, Table of n, a(n) for n = 1..80 n = 1..43 from Giovanni Resta
Programs
-
Python
# WARNING: this prints numbers in the sequence, but not in increasing order. def moda(n,a): kk = 0 while n > 0: kk= kk+(n%10)**a n =int(n//10) return kk def sod(n): kk = 0 while n > 0: kk= kk+(n%10) n =int(n//10) return kk for a in range (1, 10): for c in range (1, 10**8): if c==sod(c)**2*moda(c,a): print(c, end=",")
Extensions
a(16)-a(30) from Giovanni Resta, May 09 2015
Comments