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.

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.

This page as a plain text file.
%I A380810 #32 Feb 05 2025 22:17:03
%S A380810 26,126,217,729,4193,134068,10875747,24228197,2491591748,
%T A380810 106557756999043
%N 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.
%C A380810 Terms have <= 24 digits since 25*8^25 < 10^24. Full sequence is listed. - _Chai Wah Wu_, Feb 05 2025
%e A380810 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.
%p A380810 with(numtheory): P:=proc(q) local a, b, d, k, n;
%p A380810 for n from 1 to q do a:=convert(n,base,10); d:=length(n)
%p A380810 if add((a[k]-1)^d,k=1..d)=n then print(n); fi; od; end: P(3*10^7);
%t A380810 Select[Range[150000], # == Sum[(Part[IntegerDigits[#], l] - 1)^IntegerLength[#],{l, IntegerLength[#]}] &] (* _Stefano Spezia_, Feb 04 2025 *)
%o A380810 (PARI) isok(m) = my(d=digits(m), k=#d); m == sum(i=1, k, (d[i]-1)^k); \\ _Michel Marcus_, Feb 04 2025
%o A380810 (Python)
%o A380810 from itertools import chain, combinations_with_replacement, islice
%o A380810 def A380810_gen(): # generator of terms
%o A380810     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))
%o A380810 A380810_list = list(islice(A380810_gen(),10)) # _Chai Wah Wu_, Feb 05 2025
%Y A380810 Cf. A005188, A261433.
%K A380810 nonn,base,fini,full
%O A380810 1,1
%A A380810 _Paolo P. Lava_, Feb 04 2025
%E A380810 a(9)-a(10) from _Chai Wah Wu_, Feb 05 2025