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.

A257784 Numbers n such that the sum of the digits squared times the sum of the digits of n to some power equals n.

Original entry on oeis.org

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

Views

Author

Pieter Post, May 08 2015

Keywords

Comments

When the power is 1 the numbers are the cubes of their digit sum (A061209).
There are no 2-digit and 18-digit terms. - Chai Wah Wu, Jan 11 2016

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).
		

Crossrefs

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