login
A380810
Integers m for which m = Sum (d_i - 1)^k, where m is k decimal digits long and d_i are the digits of m.
1
26, 126, 217, 729, 4193, 134068, 10875747, 24228197, 2491591748, 106557756999043
OFFSET
1,1
COMMENTS
Terms have <= 24 digits since 25*8^25 < 10^24. Full sequence is listed. - Chai Wah Wu, Feb 05 2025
EXAMPLE
134068 is a term since it is k=6 digits long and its digit powers are (1-1)^6 + (3-1)^6 + (4-1)^6 + (0-1)^6 + (6-1)^6 + (8-1)^6 = 134068.
MAPLE
with(numtheory): P:=proc(q) local a, b, d, k, n;
for n from 1 to q do a:=convert(n, base, 10); d:=length(n)
if add((a[k]-1)^d, k=1..d)=n then print(n); fi; od; end: P(3*10^7);
MATHEMATICA
Select[Range[150000], # == Sum[(Part[IntegerDigits[#], l] - 1)^IntegerLength[#], {l, IntegerLength[#]}] &] (* Stefano Spezia, Feb 04 2025 *)
PROG
(PARI) isok(m) = my(d=digits(m), k=#d); m == sum(i=1, k, (d[i]-1)^k); \\ Michel Marcus, Feb 04 2025
(Python)
from itertools import chain, combinations_with_replacement, islice
def A380810_gen(): # generator of terms
yield from chain.from_iterable(sorted(map(lambda s:sum((int(d)-1)**l for d in s), sorted(filter(lambda s:sorted(str(m:=sum((int(d)-1)**l for d in s)))==list(s) and 10**l>m>=10**(l-1), combinations_with_replacement('0123456789', l))))) for l in range(1, 25))
A380810_list = list(islice(A380810_gen(), 10)) # Chai Wah Wu, Feb 05 2025
CROSSREFS
Sequence in context: A124954 A126413 A246032 * A044358 A044739 A304834
KEYWORD
nonn,base,fini,full
AUTHOR
Paolo P. Lava, Feb 04 2025
EXTENSIONS
a(9)-a(10) from Chai Wah Wu, Feb 05 2025
STATUS
approved