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.

Showing 1-3 of 3 results.

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

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

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 37, 48, 415, 231591, 3829377463694454, 56407086228259246207394322684
Offset: 1

Views

Author

Pieter Post, May 08 2015

Keywords

Comments

The first nine terms are trivial, but then the terms become very rare. It appears that this sequence is finite.

Examples

			37 = (3^3+7^3)/(3+7).
231591 = (2^7+3^7+1^7+5^7+9^7+1^7)/(2+3+1+5+9+1).
		

Crossrefs

Programs

  • 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:
            kk= kk+(n%10)
            n =int(n//10)
        return kk
    for a in range (1, 10):
        for c in range (1, 10**6):
            if c*sod(c)==moda(c, a):
                print (a,c, moda(c,a),sod(c))

Extensions

a(14) from Giovanni Resta, May 09 2015
a(15) from Chai Wah Wu, Nov 30 2015

A257860 Numbers n such that a digit of n to the power k plus the sum of the other digits of n equals n, where k is a positive integer.

Original entry on oeis.org

1, 89, 132, 264, 518, 739, 2407, 6579, 8200, 8201, 8202, 8203, 8204, 8205, 8206, 8207, 8208, 8209, 32780, 32781, 32782, 32783, 32784, 32785, 32786, 32787, 32788, 32789, 59060, 59061, 59062, 59063, 59064, 59065, 59066, 59067, 59068, 59069, 78145, 524300, 524301, 524302, 524303, 524304, 524305, 524306, 524307, 524308, 524309, 531459, 823567, 2097178
Offset: 1

Views

Author

Pieter Post, May 11 2015

Keywords

Comments

There are numbers that come in groups of 10, like 8200, 32780 and 524300. But there are also a few stand-alone numbers. Like 531459 (=5+3+1+4+5+9^6).
It is easy to generate large terms in the sequence, for example, 9^104+409 and 9^1047+4561 are the smallest terms with 100 and 1000 digits, respectively. - Giovanni Resta, May 12 2015

Examples

			89 is in the sequence because 89 = 8+9^2.
2407 is in the sequence because 2407 = 2+4+0+7^4.
8202 is in the sequence because 8202 = 8+ 2^13 +0+2, also 8202 = 8+2+0+2^13.
		

Crossrefs

Programs

  • Haskell
    import Data.List (nub); import Data.List.Ordered (member)
    a257860 n = a257860_list !! (n-1)
    a257860_list = 1 : filter f [1..] where
       f x = any (\d -> member (x - q + d) $ ps d) $ filter (> 1) $ nub ds
             where q = sum ds; ds = (map (read . return) . show) x
       ps x = iterate (* x) (x ^ 2)
    -- Reinhard Zumkeller, May 12 2015
  • Python
    def sod(n):
        kk = 0
        while n > 0:
            kk= kk+(n%10)
            n =int(n//10)
        return kk
    for i in range (1,10**7):
        for j in range(1,len(str(i))+1):
            k=(i//(10**(j-1)))%10
            for m in range (2,30):
                if i==sod(i)+k**m-k:
                    print (i)
    

Extensions

One more term and some missing data added by Reinhard Zumkeller, May 12 2015
Showing 1-3 of 3 results.