login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A347189 Positive integers that can be expressed as the sum of powers of their digits (from right to left) with consecutive natural exponents. 0
1, 2, 3, 4, 5, 6, 7, 8, 9, 24, 332, 1676, 121374, 4975929, 134116265, 1086588775, 3492159897, 8652650287, 8652650482 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Any number > 9 consisting of just one digit (A014181) can't be in the list. (Provable using the Carmichael function.)
LINKS
EXAMPLE
24 = 4^2 + 2^3 is a term.
332 = 2^3 + 3^4 + 3^5 is another term.
PROG
(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
CROSSREFS
Sequence in context: A061862 A007532 A349279 * A068189 A069716 A095289
KEYWORD
nonn,base,more
AUTHOR
Reiner Moewald, Aug 21 2021
EXTENSIONS
a(15)-a(19) from Michael S. Branicky, Aug 31 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 07:43 EDT 2024. Contains 371799 sequences. (Running on oeis4.)