|
|
A257786
|
|
Numbers n such that the square root of the sum of the digits times the sum of the digits of n in some power equal n.
|
|
0
|
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
It appears that this sequence is finite.
|
|
LINKS
|
|
|
EXAMPLE
|
376 = sqrt(3+7+6)*(3^2+7^2+6^2).
13131 = sqrt(1+3+1+3+1)*(1^7+3^7+1^7+3^7+1^7).
|
|
PROG
|
(Python)
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:
........k= kk+(n%10)
........n =int(n//10)
....return kk
for a in range (1, 10):
for c in range (1, 10**8):
if c**2==sod(c)*moda(c, a)**2:
print (a, c, sod(c), moda(c, a))
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|