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.
%I A128290 #28 Feb 17 2025 01:55:37 %S A128290 1,2,3,4,5,6,7,8,9,22,36,63,109,123,132,158,185,190,199,208,213,231, %T A128290 280,289,298,307,312,321,333,370,406,458,460,469,485,496,505,518,548, %U A128290 550,556,559,565,581,584,595,604,640,649,655,667,676,694,703,730,766,802 %N A128290 If p(x) is the product of the digits of the number x and s(x) the sum of the digits then the sequence lists all the numbers k for which p(s(k)) = s(p(k)), with k >= 1. %H A128290 Michael S. Branicky, <a href="/A128290/b128290.txt">Table of n, a(n) for n = 1..10000</a> %e A128290 496 is a term: s(496) = 4+9+6 = 19, p(s(496)) = 1*9 = 9, p(496) = 4*9*6 = 216, s(p(496)) = 2+1+6 = 9. %e A128290 845 is a term: s(845) = 8+4+5 = 17, p(s(845)) = 1*7 = 7, p(845) = 8*4*5 = 160, s(p(845)) = 1+6+0 = 7. %e A128290 From _Jon E. Schoenfield_, Jun 15 2024: (Start) %e A128290 Expressed more visually: %e A128290 . %e A128290 Sum Sum %e A128290 496 --------> 19 845 --------> 17 %e A128290 | 4+9+6 | | 8+4+5 | %e A128290 P | 4 P | P | 8 P | %e A128290 r | * r | 1 r | * r | 1 %e A128290 o | 9 o | * o | 4 o | * %e A128290 d | * d | 9 d | * d | 7 %e A128290 | 6 | | 5 | %e A128290 v Sum v v Sum v %e A128290 216 --------> 9 160 --------> 7 %e A128290 2+1+6 1+6+0 %e A128290 (End) %p A128290 P:=proc(q) local a,b,c; a:=convert(q,base,10): b:=convert(a,`+`): c:=convert(a,`*`): %p A128290 if convert(convert(b,base,10),`*`)=convert(convert(c,base,10),`+`) then q; fi; end: seq(P(i),i=1..10^3); # _Paolo P. Lava_, Jun 15 2024 %t A128290 p[n_] := Times @@ IntegerDigits[n]; Select[Range[1000], p[DigitSum[#]] == DigitSum[p[#]] &] (* _Paolo Xausa_, Jun 17 2024 *) %o A128290 (Python) %o A128290 from math import prod %o A128290 def ok(n): %o A128290 d = list(map(int, str(n))) %o A128290 p, s = prod(d), sum(d) %o A128290 return sum(map(int, str(p))) == prod(map(int, str(s))) %o A128290 print([k for k in range(1, 803) if ok(k)]) # _Michael S. Branicky_, Jun 15 2024 %Y A128290 Cf. A007953, A007954, A128212, A128244. %K A128290 easy,nonn,base %O A128290 1,2 %A A128290 _Paolo P. Lava_ and _Giorgio Balzarotti_, May 04 2007