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.

A257814 Numbers n such that k times the sum of the digits (d) to the power k equal n, so n=k*sum(d^k), for some positive integer k, where k is smaller than sum(d^k).

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 50, 298, 130004, 484950, 3242940, 4264064, 5560625, 36550290, 47746195, 111971979, 129833998, 9865843497, 46793077740, 767609367921, 4432743262896, 42744572298532, 77186414790914, 99320211963544, 99335229415136, 456385296642870
Offset: 1

Views

Author

Pieter Post, May 10 2015

Keywords

Comments

The first nine terms are trivial, but then the terms become scarce. The exponent k must be less than the "sum of the digits" raised to the k-th power, otherwise there will be infinitely many terms containing 1's and 0's, like 11000= 5500*(1^5500+1^5500+0^5500+0^5500+0^5500). It appears this sequence is finite, because there is a resemblance with the Armstrong numbers (A005188).

Examples

			50 = 2*(5^2+0^2);
484950 = 5*(4^5+8^5+4^5+9^5+5^5+0^5).
		

Crossrefs

Programs

  • PARI
    sdk(d, k) = sum(j=1, #d, d[j]^k);
    isok(n) = {d = digits(n); k = 1; while ((val=k*sdk(d,k)) != n, k++; if (val > n, return (0))); k < sdk(d,k);} \\ Michel Marcus, May 30 2015
  • Python
    def mod(n,a):
        kk = 0
        while n > 0:
            kk= kk+(n%10)**a
            n =int(n//10)
        return kk
    for a in range (1, 10):
        for c in range (1, 10**7):
            if c==a*mod(c,a) and a
    				

Extensions

a(16)-a(28) from Giovanni Resta, May 10 2015