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.

Previous Showing 31-32 of 32 results.

A347189 Positive integers that can be expressed as the sum of powers of their digits (from right to left) with consecutive natural exponents.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 24, 332, 1676, 121374, 4975929, 134116265, 1086588775, 3492159897, 8652650287, 8652650482
Offset: 1

Views

Author

Reiner Moewald, Aug 21 2021

Keywords

Comments

Any number > 9 consisting of just one digit (A014181) can't be in the list. (Provable using the Carmichael function.)

Examples

			24 = 4^2 + 2^3 is a term.
332 = 2^3 + 3^4 + 3^5 is another term.
		

Crossrefs

Programs

  • Python
    liste = []
    for ex in range(0, 20):
        for t in range(1, 10000):
            n = t
            pot = ex
            ergebnis = 0
            while n > 0:
                pot = pot + 1
                rest = n % 10
                n = (n - rest) // 10
                zw = 1
                for i in range(pot):
                    zw = zw * rest
                ergebnis = ergebnis + zw
            if (int(ergebnis) == t) and (t not in liste):
                liste.append(t)
    liste.sort()
    print(liste)
    
  • Python
    def powsum(digits, startexp):
        return sum(digits[i]**(startexp+i) for i in range(len(digits)))
    def ok(n):
        if n < 10: return True
        s = str(n)
        if set(s) <= {'0', '1'}: return False
        digits, startexp = list(map(int, s))[::-1], 1
        while powsum(digits, startexp) < n: startexp += 1
        return n == powsum(digits, startexp)
    print(list(filter(ok, range(2*10**5)))) # Michael S. Branicky, Aug 29 2021

Extensions

a(15)-a(19) from Michael S. Branicky, Aug 31 2021

A333670 Numbers m such that m equals abs(d_1^k - d_2^k + d_3^k - d_4^k ...), where d_i is the decimal expansion of m and k is some power greater than 2.

Original entry on oeis.org

0, 1, 48, 240, 407, 5920, 5921, 2918379, 7444416, 18125436, 210897052, 6303187514, 8948360198, 10462450356, 11647261846, 18107015789, 27434621679, 31332052290, 4986706842391, 485927682264092, 1287253463537089, 126835771455251081, 559018292730428520, 559018292730428521
Offset: 1

Views

Author

Pieter Post, Apr 01 2020

Keywords

Comments

For terms > 1, the exponents k are 2, 4, 3, 4, 4, 7, 8, 8, 11, 11, 21, 11, 11, 11, 11, 13, 15, 16, 22, 21, 21.

Examples

			48 = abs(4^2 - 8^2), 5920 = abs(5^4 - 9^4 + 2^4 - 0^4).
		

Crossrefs

Programs

  • Python
    def moda(n,a):
        kk,j = 0,1
        while n > 0:
            kk= kk-j*(n%10)**a
            n,j =int(n//10),-j
        return abs(kk)
    for i in range (0,10**7):
        for t in range(2,21):
            if i==moda(i,t):
                print (i)
                break

Extensions

a(19)-a(24) from Giovanni Resta, Apr 02 2020
Previous Showing 31-32 of 32 results.