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.

A342945 Numbers m such that d(1)^1 + d(2)^2 + ... + d(p)^k = d(1)! + d(2)! + ... + d(k)!, where d(i), i=1..k, are the digits of m.

This page as a plain text file.
%I A342945 #16 May 22 2021 04:35:07
%S A342945 1,2,11,21,33,111,211,331,403,1065,1111,1200,2065,2111,2200,3050,3265,
%T A342945 3311,4031,4122,4130,4543,5143,10651,11111,11650,12001,12010,12100,
%U A342945 13000,15330,20651,21111,21650,22001,22010,22100,23000,25330,30200,30501,30510,31500
%N A342945 Numbers m such that d(1)^1 + d(2)^2 + ... + d(p)^k = d(1)! + d(2)! + ... + d(k)!, where d(i), i=1..k, are the digits of m.
%e A342945 3265 is in the sequence because 3^1 + 2^2 + 6^3 + 5^4 = 3! + 2! + 6! + 5! = 848.
%t A342945 Select[Range@40000,Total[(a=IntegerDigits@#)^Range@Length@a]==Total[a!]&] (* _Giorgos Kalogeropoulos_, Mar 30 2021 *)
%o A342945 (Python)
%o A342945 from math import factorial
%o A342945 def digfac(s): return sum(factorial(int(d)) for d in s)
%o A342945 def digpow(s): return sum(int(d)**i for i, d in enumerate(s, start=1))
%o A342945 def aupto(limit):
%o A342945   alst = []
%o A342945   for k in range(1, limit+1):
%o A342945     s = str(k)
%o A342945     if digpow(s) == digfac(s): alst.append(k)
%o A342945   return alst
%o A342945 print(aupto(32000)) # _Michael S. Branicky_, Mar 30 2021
%Y A342945 Cf. A002275, A342944, A342826, A178354.
%K A342945 nonn,base
%O A342945 1,2
%A A342945 _Carole Dubois_, Mar 30 2021